A character set defines the properties of character data, based on the following three attributes:
character-set-specification::=[MASTER.]character-set-name
character-set-name ::= {EBCDIK|UTF16}
Table 1-9 Character sets available in HiRDB
Character set name | Usage format | Character repertoire | Default collation sequence |
---|---|---|---|
EBCDIK | EBCDIK code. Characters are represented by 8-bit (single-byte) character codes. | All EBCDIK-encoded characters | Code ordering based on bit combinations |
UTF16 | Characters are represented in the character encoding format defined by JIS X 0221 (ISO/IEC 10646), in which each character is encoded as two or four bytes. Byte order is big-endian. | All Unicode characters | Code ordering based on bit combinations |
Table 1-10 Default character sets for character codes specified in the pdntenv (pdsetup) command
Character code specified in command | Default character set |
---|---|
sjis | Shift JIS kanji code |
chinese | EUC Chinese kanji code |
ujis | EUC Japanese kanji code |
utf-8 | Unicode (UTF-8) |
lang-c | Single-byte character code |
chinese-gb18030 | Chinese kanji code (GB18030) |
To use data encoded as UTF-16 in the ? parameter, specify the character set name in the character set descriptor area. Specifying UTF-16 data handling in the preprocessing options or embedded variable definitions allows data encoded as UTF-16 to also be used in embedded variables. In this case, the SQL preprocessor determines the character set name based on the specified preprocessing options and the embedded variable.
In addition to UTF16, either UTF-16LE or UTF-16BE can be specified as the character set name.
In the following descriptions, the UTF-16 character set name is assumed to include UTF-16LE and UTF-16BE.
For details about specifying the character set in preprocessing options, embedded variable definitions, or the character set descriptor area, see the HiRDB Version 9 UAP Development Guide.