Using ABL to simulate inputting double-byte characters
To input a double-byte character using ABL, assemble the character using the CHR function. This is the syntax:
CHR ( expression[ , target-codepage[ , source-codepage]] )
|
The following example creates and displays the double-byte character shown below:
It is from the KSC5601 code page, which supports Korean:
DEFINE VARIABLE cDoubleByteChar AS CHARACTER NO-UNDO.
cDoubleByteChar = CHR((236 * 256) + 237).
DISPLAY cDoubleByteChar WITH 1 COLUMN.
|
In the preceding example, the second line shifts the first value into the lead byte and adds the second value to the trail byte.
Note: The preceding example assumes the internal code page (-cpinternal) is set to KSC5601.