Skip to main content

Encoding of character fields

The encoding that is used for character fields in the database may be specified by using the PARAMs named WA-CHARSET-FOR-CHAR and WA-CHARSET-FOR-NCHAR. The value of WA-CHARSET-FOR-CHAR sets the encoding used to interpret values of single-byte character fields. The value of WA-CHARSET-FOR-NCHAR sets the encoding used to interpret values of double-byte character fields. These PARAMs are set before starting WAGENT. They are optional and may be be given separately or together. If these PARAMs are set, they control the interpretation of all character fields of all tables or files referenced by TQL applications that specify the WAGENT that received the PARAMs.

The values specified for these PARAMs are not validated at the time WAGENT starts. If a value is not one of the ones given in the table below, this is detected at the time a TQL application is started that references a table or file that includes character fields of the type the PARAM controls.

Any of the encoding names may be given as the value of either of the PARAMs. There is no attempt to restrict use of certain encodings to single-byte characters or double-byte characters.

The values that are recognized for these PARAMs are given in the following table. The values are case-sensitive, so enter them exactly as they appear in this table.

eucJP

extended unix code for Japanese

eucKR

extended unix code for Korean

eucTW

extended unix code for Taiwan

ISO8859-1

Latin-1, Western European

ISO8859-2

Latin-2, Central European

ISO8859-3

Latin-3, South European

ISO8859-4

Latin-4, North European

ISO8859-5

Latin/Cyrillic

ISO8859-6

Latin/Arabic

ISO8859-7

Latin/Greek

ISO8859-8

Latin/Hebrew

ISO8859-9

Latin-5, Turkish

SJIS

Shift JIS, a common encoding of Japanese Kanji characters

UCS-2

The original 2-byte, big-endian Unicode encoding

UTF-16

The current standard 2-byte, big-endian Unicode encoding

UTF-8

The most common Unicode encoding