Copy link to clipboard
Copied
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);
};
Copy link to clipboard
Copied
Knowing nothing about this, is doc.Import
an FM FDK API?
If it's an analog of the File > Import command, I'd expect it to have options for Copy-In v. By-Reference, and some vague spec for object type.
And on that, I note that the command, for Text, only specifies "Text", and does not resolve to codeset.
UTF-8 BMP v. SMP would of course also potentially arise.
Copy link to clipboard
Copied
Hi Bob, Yes, but when you choose Text in the interface and go to the next dialog, you can specify the encoding. There are FDK/ExtendScript import settings for all of the entries except the UTF entries.