When code-set conversion is performed

An application must use code-set conversion only if the two code sets (client and server-processing locale, or server-processing locale and server) are different.

The following situations are possible causes of code sets that differ:
  • Different operating systems might encode the same characters in different ways.

    For example, the code for the character (a-circumflex) in Windows Code Page 1252 is hexadecimal 0xE2. In Informix® Coded Character Set Identifier (CCSID) 437 (a common Informix® UNIX code set), the code is hexadecimal 0x83. If the code for on the client is sent unchanged to the Informix® UNIX computer, it prints as the Greek character g (gamma). This action occurs because the code for g is hexadecimal 0xE2 on the Informix® UNIX computer.

Tip: HCL Informix® products support Informix® CCSID code-set numbers, a system of 16-bit numbers that uniquely identify the coded graphic character representations. For more information, see Manage GLS files.
  • One language can have several code sets. Each might represent a subset of the language.

    For example, the code sets ccdc and big5 are both internal representations of a subset of the Chinese language. These subsets, however, include different numbers of Chinese characters.

Important: GLS fully supports the unified Chinese GB18030-2000 code set, including all characters in the Unicode Basic Multilingual Plane (BMP) and in the extended planes.
If a code-set conversion is required for data transfer from computer A to computer B, then it is also required for data transfer from computer B to computer A. In the client/server environment, the following situations might require code-set conversion:
  • If the client locale and database locale specify different code sets, the client application performs code-set conversion so that the server computer is not loaded with this type of processing. For more information, see Client application code-set conversion.
  • If the server locale and server-processing locale specify different code sets, the database server performs code-set conversion when it writes to and reads from operating-system files such as log files. For more information, see Database server code-set conversion.
In the following figure, the black dots indicate the two points in a client/server environment at which code-set conversion might occur.
Figure 1. Points of GLS code-set conversion
begin figure description - This figure is described in the surrounding text. - end figure description

In the example connection that the previous figure shows, the Informix® ESQL/C client application performs code-set conversion on the data that it sends to and receives from the database server if the client and database code sets are convertible. The HCL Informix® database server also performs code-set conversion when it writes to a message-log file if the code sets of the server locale and server-processing locale are convertible.