The sysLib.setCharacterEncoding() system function specifies an alternative encoding for character text (CHAR, MBCHAR, or DBCHAR variables).
EGL assumes that CHAR, MBCHAR, or DBCHAR variables always use the default file encoding for Java programs. You can use the sysLib.setCharacterEncoding() function to specify the encoding of character text (CHAR, MBCHAR, or DBCHAR variables) when those variables are converted to UNICODE text in a UNICODE or STRING variable and vice versa. This allows different encodings to be used within a single program.
sysLib.setCharacterEncoding(
arg any in,
encoding STRING in)
The following example sets the encoding of a CHAR-type variable:
sysLib.setCharacterEncoding(aChar, "GBK")
Platform | Issue |
---|---|
COBOL generation | The setCharacterEncoding() function is not supported. |
JavaScript generation | The setCharacterEncoding() function is not supported. |