OutputUnicode property: Query class
Description
Use this property to set or return a Boolean value indicating whether the RunToFile method will create a Unicode-encoded CSV file as output. This property is applicable only if the output format is set to %Query_TXT. Because the default value is false, OutputUnicode must be set before calling RunToFile.
Note:
Because Microsoft Excel does not support UTF-8 encoding, the CSV file is written in binary mode with UCS-2 encoded data. Moreover, Excel does not automatically recognize Unicode-encoded, comma-delimited files even if they have a .csv extension. Therefore, the user receiving the file will not be able to open it by double-clicking. Instead, he or she must open it with Excel’s File, Open menu and choose the comma delimiter.
This property is read/write.
Example
&aQry.OutputUnicode = True;
&Result = &aQry.RunToFile(&rcdQryPrompts, &sOutFile, %Query_TXT, 0);
Related Topics