Specifies the Informix database locale, which the Informix database server uses to process locale-sensitive data.
Syntax:
DB_LOCALE=<language>_<territory>.<code_set>@modifier
Possible values:
Value |
Description |
<language> |
Two-character name that represents the language for a specific locale. |
<territory> |
Two-character name that represents the cultural conventions. For example, territory might specify the Swiss version of the French, German, or Italian language. |
<code_set> |
Name of the code set that the locale supports. |
@modifier |
Optional locale modifier that has a maximum of four alphanumeric characters. The modifier specification modifies the cultural-convention settings that the language and territory settings imply. The modifier can indicate a localized collating order that the locale supports. For example, you can set @modifier to specify dictionary or telephone-book collation order. |
Usage:
The DB_LOCALE environment variable specifies the Informix database locale, which the Informix database server uses to process locale-sensitive data.
IBM® Informix® products use the DB_LOCALE environment variable for the following purposes:
When a client application and a database server exchange character data, the client application performs code-set conversion when the value of the DB_LOCALE environment variable (on the client computer) is different from the value of CLIENT_LOCALE.
When the client application requests a connection, it sends information, including the DB_LOCALE (if it is set), to the database server.
The database server uses DB_LOCALE when it determines how to set the database information of the server-processing locale.
When a client application tries to open a database, the database server compares the value of the DB_LOCALE environment variable that the client application passes with the database locale that is stored in the database.
When the database server accesses columns of locale-sensitive data types, it uses the locale that DB_LOCALE specifies.
When the database server creates a database, it examines the database locale (DB_LOCALE) to determine how to store character information in the system catalog of the database. This information includes operations such as how to handle regular expressions, compare character strings, and ensure correct use of code sets.
The database server stores a condensed version of the database locale in the systables system catalog table.
When the database server stores the database locale information directly in the system catalog, it permanently attaches the locale to the database. This information is used throughout the lifetime of the database. In this way, the database server can always determine the locale that it needs to interpret the locale-sensitive data correctly.
The encoding in the DB_LOCALE must match the encoding of the database.
If you do not set DB_LOCALE on the client computer, client applications assume that the database locale has the value of the CLIENT_LOCALE environment variable. The client application, however, does not send this default value to the database server when it requests a connection.
The DB_LOCALE environment variable applies at runtime (inet.env).
Example:
Setting the French locale for Canada, and the ISO 8859-1 character set will look as follows:
DB_LOCALE=fr_ca.8859-1