SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-3
Character Sets
Character Sets
When you run the InstallSqlmx script during NonStop SQL/MX installation, you
specify the NATIONAL_CHARSET attribute to select a default NCHAR character set of
UCS2, ISO88591, KANJI, or KSC5601. If you do not specify a character set, the
default is UCS2. Once the default is set, you cannot change it. For more information
about setting this default, see the instructions for installing NonStop SQL/MX in the
SQL/MX Installation and Management Guide.
After you have set the character set default, when you create SQL/MX tables, NCHAR
data type fields use this character set as the default.
Within programs, NonStop SQL/MX allows you to associate one of these character
sets with a literal or host variable:
KANJI and KSC5601 are valid only for SQL/MP tables.
For more information about defining character data, see the guidelines for creating an
SQL/MX database in the SQL/MX Installation and Management Guide.
Restrictions on Using Character Set Data
For SQL/MX tables, only ISO88591 characters are allowed in these fields:
Note. KANJI and KSC5601 are valid character sets for SQL/MP tables but not SQL/MX tables.
If you attempt to create an SQL/MX table with KANJI, KSC5601, or other unsupported
character sets, you get an SQL error and the operation fails.
ISO88591 Default single-byte 8-bit character set for character data types, which
supports English and other Western European languages.
UCS2 Double-byte Unicode character set in UTF16 big-endian encoding. All
Basic Multilingual Plan (BMP) characters are included. Surrogate
characters are treated as two double-byte characters.
KANJI Double-byte character set widely used on Japanese mainframes. It is a
subset of Shift JIS (the double character portion). Its encoding is
big-endian.
KSC5601 Double-byte character set required on systems used by government
and banking within Korea. Its encoding is big-endian.
ISO88591 Field Where Found
BY partitioning-column CREATE INDEX, CREATE TABLE statements
FIRST KEY values CREATE TABLE, CREATE INDEX statements; MODIFY TABLE
utility.
CHECK constraint text CREATE TABLE and ALTER TABLE statements
Column HEADING
text
CREATE TABLE and ALTER TABLE statement