SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—523725-004
9-158
TRANSLATE Function
TRANSLATE Function
The TRANSLATE function translates a character string from a source character set to
a target character set.
character-value-expression
is a character string.
translation-name
is one of these translation names:
translation name identifies the translation, source and target character set.
When you translate to the UCS2 character set no data loss is possible. However,
when NonStop SQL/MX translates a character-value-expression from
UCS2, certain characters encoded in UTF16 cannot be converted to the target
character set. NonStop SQL/MX displays an error in this case.
NonStop SQL/MX returns a variable-length character string with character
repertoire equal to the character repertoire of the target character set of the
TRANSLATE(character-value-expression USING translation-name)
Translation Name Source
Character Set
Target
Character Set
Comments
ISO8859XToUCS2
(X in 1)
ISO8859X UCS2 No data loss is possible.
UCS2ToISO8859X
(X in 1)
UCS2 ISO8859X
No data loss is possible.
NonStop SQL/MX will
display error 8413 if it
encounters a Unicode
character that cannot be
converted to the target
character set.
KANJITOISO88591 KANJI ISO88591
Convert a KANJI source
to a multibyte ISO88591
target. Every character is
copied as is. No check on
the source data. No data
loss is possible.
KSC5601TOISO88591 KSC5601 ISO88591 Convert a KSC5601
source to a multibyte
ISO88591 target. Every
character is copied as is.
No check on the source
data. No data loss is
possible.