FileEncoding Attribute
Data Type: integer
4GL Access: RW
The FileEncoding attribute specifies what encoding format to use when writing a LongVcharObject using the WriteToFile method (see
WriteToFile Method).
When FileHandle (see
FileHandle Attribute) is set, a file will be read in and converted, if necessary, before being assigned to a LongVcharObject. When the WriteToFile method is executed, the content of the LongVcharObject will be written out with the encoding format specified by the FileEncoding attribute.
If a character in the string cannot be converted, the default substitute character '?' will be used. '?' is used because it is a valid character in all character sets.
Note: Even if an incorrect encoding is specified, no data will be lost through translation.
You can set FileEncoding to one of the following constants:
FE_DEFAULT
Specifies that the file encoding format is the same as that which OpenROAD currently uses. This means that if II_CHARSETxx is UTF8, then UTF8 encoding is used. For any other setting, its active code page is used.
FE_WCHAR
Specifies that the file is generated using wide-char APIs that are in the same format (size and endian) as the system that OpenROAD is running on.
FE_ACP
Specifies that the file encoding format is the current system active code page. For example, if II_CHARSETxx is UTF8, the file format could be WIN1252 if that is the current active code page.
code_page_identifier
Specifies a Microsoft code page identifier, for example, 1252 for ANSI Latin 1/Western European (Windows)
Default: FE_DEFAULT
All code pages are supported on Microsoft Windows platforms. Only the following subset of code pages is supported on UNIX systems: 037, 437, 500, 708, 720, 737, 775, 850, 852, 855, 857, 860, 861, 862, 863, 864, 865, 866, 869, 870, 874, 875, 932, 936, 949, 950, 1026, 1200, 1201, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1361, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10010, 10017, 10029, 10079, 10081, 10082, 20127, 20865, 20866, 28591, 28592, 29001, 65001.
Descriptions of system constant values and their numeric equivalents are listed in
FileEncoding Settings.
Last modified date: 12/20/2023