The value of locale variable, CLIENT_LOCALE or DB_LOCALE can be broken into 4 parts.
1 2 3 4
<language>_<territory>.<Code set name/Code set number>[@modifier]
-------- -------- ----------------------------- --------
Conventional, I represent this as ll_tt.xxxx@xyz, where ...
- ll ............ represents the Language
tt ........... represents the Territory, or cultural convention.
xxxx ....... represents the Code set Name or the Code set Number supported by the locale and
xyz ......... represents the Modifier. This is the only optional part in a locale value.
The modifier, sometimes refered as variant, modifies the cultural-convention settings that the language and territory settings imply. It usually indicates a special localized collating order that the locale supports.
Let us look at an example.
- CLIENT_LOCALE = de_at.cp1252@euro, and
- Here, both CLIENT_LOCALE values represent the same locale.
- 1252 is the Code set number for Code set name, cp1252. We can specify either Code set name or the Code set number in a locale value.
CLIENT_LOCALE = de_at.1252@euro
- - de ........... represents the German language
- at ............ the territory, Austria
- cp1252 ... the code set used for the encoding and
- euro ....... the modifier used for the locale
So, this is German language locale, for Austria, using cp1252 encoding and euro modifier.
Now, to check if this locale file exists, where to lookup ?
- All locale files reside under directory $INFORMIXDIR/gls/lc11
To lookup for locale files for language (ll) and territory (tt), we check under $INFORMIXDIR/gls/lc11/ll_tt directory.
- In our example, to lookup for locale files for German language (de), for territory Austria (at), we will lookup $INFORMIXDIR/gls/lc11/de_at directory
Next, under the specified locale directory, look for files with name represented by hex value of the code set name/ code set number, along with modifier name if modifier is specified, with an extension .lco
In our example, hex value for Code set cp1252 is 04e4 and modifier euro is used. So, we will look for file 04e4euro.loc under directory $INFORMIXDIR/gls/lc11/de_at.
How and where to find the hex value for a Code set name ?
- For any Code set name, its Code set number and hex value can be looked-up in file $INFORMIXDIR/gls/cm3/registry.
- Let us find the hex value for Code set name Latin-3.
We can find the information in file
In the registry file ...
- - first coulmn represents the code set name,
- second column is code set number
- third column is the hex value of the code set number, and
- fourth column, is either blank or has comment about the code set.
- Let us lookup for code set, Latin-3 in registry file and see what we find.
We get the following value.
Latin-3 57346 0xe002
--------- ------------ ----------- --------------------------------
code set name code set number hex value in this case, there is no comment
- Locale values are case in-sensitive.
- You can specify either code set name or code set number in a locale value, but you cannot use the hex value of the code set number.
- If modifier is not specified in the locale variable, like say ...
- If modifier is specified in the locale variable, like ...
- Code set name, its corresponding Code set number and hex value is specified in file
- Locale Territory/ Country code and Language code can be looked up in file
- Conventionally, for LOCALE variable having value ll_tt.xxxx[@xyz], following locale file should exist.
- DB_LOCALE = de_de.cp1252, DB_LOCALE = de_de.CP1252.
Here, both locale values are valid, representing the same code set.
- DB_LOCALE = fr_ca.57372 or fr_ca.utf8, ........ both values are valid and they represent the same code set.
DB_LOCALE = de_de.cp1252 or de_de.1252 .... both values are valid and they represent the same code set
CLIENT_LOCALE = de_at.cp1252
- - to locate the locale file, look for
CLIENT_LOCALE = de_at.cp1252@euro
- - to locate the locale file, look for
- $INFORMIXDIR/gls/lc11/ll_tt/<hex value of xxxx>[xyz].lco