Neoview Character Sets Administrator's Guide (R2.4, R2.5)

Table 3-4 Behaviors of SQL String Functions in the Three Configurations
Unicode Configuration
Considerations
SJIS Configuration
Considerations
ISO88591
Configuration
ConsiderationsSQL String Function and Description
If the value of the first
byte in the string is
greater than 127,
Neoview SQL returns
error 8428 (“The
argument to function
ASCII is not valid”).
If the value of the first
byte in the string is
greater than 127,
Neoview SQL returns
error 8428 (“The
argument to function
ASCII is not valid”).
No special
considerations
ASCII: Returns the code point value for the
first byte in a character string.
Valid
char-set-name
values are UTF8,
ISO88591, and
UCS2. Users who
want
char-set-name to
be ISO88591 or
UTF8 must
explicitly specify it.
The default
char-set-name
value is UCS2. If no
value is specified,
the CHAR function
assumes it is UCS2.
If char-set-name
is UTF8 or
ISO88591 and
code-value can be
mapped to a valid
UTF8 character, the
CHAR function
returns a UTF8
character.
For a UTF8
character, the return
type is
VARCHAR(4).
Valid
char-set-name
values are SJIS,
ISO88591, and
UCS2. Users who
want
char-set-name
to be SJIS or UCS2
must explicitly
specify it.
The default
char-set-name
value is
ISO88591. If no
value is specified,
the CHAR
function assumes
it is an ISO88591
column containing
SJIS data.
If the
char-set-name
value is SJIS or
ISO88591 and
code-value can
be mapped to a
valid SJIS
character, the
CHAR function
returns a SJIS
character.
For a SJIS
character, the
return type is
VARCHAR(2).
The
char-set-name
value can be
ISO88591 or UCS2.
If no value is
specified for
char-set-name,
the CHAR function
assumes it is
ISO88591. Users
who want
char-set-name to
be UCS2 must
explicitly specify it.
CHAR: Returns the character that has the
specified code-value. The value of
char-set-name can be ISO88591, UCS2,
SJIS (for the SJIS configuration only), and
UTF8 (for the Unicode configuration only).
Every character,
including multibyte
characters, counts as
one character.
Every character,
including multibyte
characters, counts as
one character.
Every character,
including multibyte
characters, counts as
one character.
CHAR_LENGTH: Returns the number of
characters in a string.
The character string
argument in the
CODE_VALUE
function can be in one
of the character sets
supported by this
configuration.
The character string
argument in the
CODE_VALUE
function can be in one
of the character sets
supported by this
configuration.
The character string
argument in the
CODE_VALUE
function can be in one
of the character sets
supported by this
configuration.
CODE_VALUE: Returns an unsigned
integer for the code point value of the first
character in a character string.
28 Using SQL Language Elements to Define and Manage Database Encoding