On most platforms, Client-Library and Server-Library applications use the following localization environment variables:
LC_ALL
LC_COLLATE
LC_CTYPE
LC_MESSAGE
LC_TIME
LANG
Some systems (typically UNIX systems)
automatically set localization environment variables to a specific
value when a user logs in. If your system does this, either make
sure that the value matches a locale name in the locales.dat file
or reset the variables after logging in.
Table 2-2 describes how Open Client and Open Server applications use these environment variables:
Environment variable |
Set to a locale name that indicates |
Used by |
When |
---|---|---|---|
LC_ALL |
Language, character set, and collating sequence to use for messages, datatype conversions, and sorting. |
A Client-Library or Open Server application. |
An application calls cs_ctx_alloc or cs_ctx_global. An application calls cs_locale with type as CS_LC_ALL and buffer as NULL. |
The Embedded SQL precompiler. |
At application precompile time, to determine the default language and character set to use for precompiler messages. |
||
A precompiled Embedded SQL application. |
At application runtime, when a precompiled application first calls cs_ctx_global. The precompiler generates a cs_ctx_global call for each Embedded SQL statement. |
||
LC_COLLATE |
Collating sequence (sort order) to use when sorting and comparing character data. |
A Client-Library or Open Server application. |
An application calls cs_locale with type as CS_LC_COLLATE and buffer as NULL. |
LC_CTYPE |
Character set to use for datatype conversions. |
A Client-Library or Open Server application. |
An application calls cs_locale with type as CS_LC_CTYPE and buffer as NULL. |
LC_MESSAGE |
Language and character set to use for messages. |
A Client-Library or Open Server application. |
An application calls cs_locale with type as CS_LC_MESSAGE and buffer as NULL. |
LC_TIME |
Date and time data representation to use for a datetime string, such as date and time formats, names in the native language, and month and day abbreviations. |
A Client-Library or Open Server application. |
An application calls cs_locale with type as CS_LC_TIME and buffer as NULL. |
LANG |
Language, character set, and collating sequence to use for messages, datatype conversions, and sorting. Open Client and Open Server products search for LANG if they cannot find LC_ALL. |
A Client-Library or Open Server application. |
If an application calls cs_ctx_alloc or cs_ctx_global, Client-Library examines LANG if LC_ALL is not defined. If an application calls cs_locale, Client-Library examines LANG if cs_locale’s buffer is NULL and the LC variable corresponding to type is not defined. |
The Embedded SQL precompiler. |
At application precompile time, if LC_ALL is not defined. |
||
A precompiled Embedded SQL application. |
At application runtime, if LC_ALL is not defined. |