Administration Guide
Locales are implemented one way in Windows and another in UNIX-based
systems. In UNIX-based systems there are two locales:
- The environment locale allows you to specify the language, currency
symbol, and so on, that you want to use.
- The program locale contains the current language, currency symbol, and so
on, of a program that is executing.
In Windows, the cultural preferences can be set through Regional Settings
of the Control Panel. However, there is no environmental locale like
the one on UNIX systems.
When your program is started, it gets a default C locale. It does
not get a copy of the environment locale. If you set the
program locale to any locale other than "C", DB2 Universal Database uses
your current program locale to determine the code page and territory settings
for your application environment. Otherwise, these values are obtained
from the operating system environment. You should note that
setlocale() is not thread-safe, and if you issue
setlocale() from within your application, the new locale is set for
the entire process.
With UNIX, the active locale used by DB2 is determined from the
LC_CTYPE portion of the locale. For details, see the NLS documentation
for your operating system.
- If LC_CTYPE of the program locale has a value other than that of
'C', DB2 will use this value to determine the application code page
by mapping it to its corresponding code page.
- If LC_CTYPE has the value of 'C' (the 'C' locale), DB2
will set the program locale according to the environment locale using the
setlocale() function.
- If LC_CTYPE still has a value of 'C', DB2 will assume the
default of the US English environment, and code page 819 (ISO
8859-1).
- If LC_CTYPE's value is no longer 'C', its new value will be
used to map to a corresponding code page. For information on the
default locale for a particular platform, see Table 143. Additional information may be found in the Application Building Guide.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]