EGL assumes that CHAR, MBCHAR, or DBCHAR variables always use the default file encoding for Java™ programs or the default encoding specified for COBOL compilation. Use the sysLib.convertEncodedTextToString() and sysLib.convertStringToEncodedText() system functions 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.convertEncodedTextToString(
source CHAR | MBCHAR | DBCHAR in,
encoding STRING in)
returns (result STRING)
The following example assigns text with ASCII Arabic encoding to a STRING variable:
aString = convertEncodedTextToString(aChar, "Cp1256");