Migration Guide : E. Features Introduced in OpenROAD 6.2 : Changes to Existing Features : LongVcharObject and StringObject Classes Get New FileEncoding Attribute
 
Share this page          
LongVcharObject and StringObject Classes Get New FileEncoding Attribute
The LongVcharObject and StringObject classes now have a new attribute:
FileEncoding
Data Type: integer
4GL Access: RW
Specifies what encoding format to use when writing a LongVcharObject or StringObject using the WriteToFile method or StringObject.AppendToFile method.
When FileHandle is set, a file will be read in and converted, if necessary, before being assigned to a LongVcharObject or StringObject.
When the WriteToFile method is executed, the content of the LongVcharObject or StringObject will be written out with the encoding format specified by the FileEncoding attribute.
When the AppendToFile method is executed, the content of the StringObject will be appended to the file with the encoding format specified by the FileEncoding attribute.
The FileEncoding attribute can be set with the following new system 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
For more information about the FileEncoding attribute, see the Language Reference Guide.