UNICODE
The primitive type UNICODE gives you a way to process and store text that may be in any of several human languages; however, the text must have been provided from outside your code. Literals of type UNICODE are not supported.
The following statements are true of an item of type UNICODE:
- The length reflects the number of characters and ranges from 1 to 16383. The number of bytes reserved for such an item is twice the value you specify for length.
- The item can be assigned or compared only to another item of type UNICODE.
- All comparisons compare the bit values in accordance with the order of characters in the UTF-16 encoding standard.
- When necessary, EGL pads the item with Unicode blanks.
- The system string functions treat the item as a string of individual bytes, which include the added Unicode blanks, if any. Any lengths you specify in those functions must be in terms of bytes rather than in terms of characters.
- You can store the value of the item in a file or database. If your code interacts with DB2 UDB, ensure that the code page for GRAPHIC data is UNICODE and that the column that stores the data item value is of SQL data type GRAPHIC or VARGRAPHIC.
For details on Unicode, see the web site of the Unicode Consortium (www.unicode.org).
Related reference
Primitive types