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.convertStringToEncodedText(
source STRING in,
encoding STRING in,
target CHAR | MBCHAR | DBCHAR inout)
The following example assigns the value of the UNICODE text in a STRING variable to a CHAR variable using ASCII Arabic encoding:
convertStringToEncodedText(aString, "Cp1256", aChar);