Question
Importing UTF-8 Text
I am using doc.Import to import a text file into FrameMaker. The text file is encoded in UTF-8. Is there a UTF-8 Constant for importing text files in FrameMaker? Here is my function:
TTC_MB.importFile = function (filename, textLoc, doc) {
var importProps, retProps, i;
// Get default property list for importing documents.
importProps = GetImportDefaultParams ();
// Get a property list to return any error messages.
retProps = new PropVals ();
// Set specific import property values to import the document.
i = GetPropIndex (importProps, Constants.FS_AlertUserAboutFailure);
importProps[i].propVal.ival = false;
i = GetPropIndex (importProps, Constants.FS_HowToImport);
importProps[i].propVal.ival = Constants.FV_DoByCopy;
// Attempt to import the document.
doc.Import (textLoc, filename, importProps, retProps);
};

