The application locale defines the language (for messages), country or
territory (for currency symbols and date formats) and code set (for character set encoding). A
program needs to be able to determine its locale and act accordingly, to be portable across
different languages and character sets.
This section describes how to define the locale for your programs.
Important: The same code point can represent different characters in different
character sets. An invalid locale configuration in one of the components can result in invalid
characters in the database. For example, a client application is configured to display glyphs
(font) for CP437. If the application gets a 0xA2 (decimal 162) code point, it displays an o-acute
character. Now imagine that the DB client is configured with character set CP1252. In this
character set, the code point 0xA2 is actually the cent currency sign. As a result, if you insert
the o-acute char (0xA2 in CP437) in the database, it will actually be seen as cent sign (0xA2 in
CP1252) by the database server. When fetching that character back to the client, the database
server returns the 0xA2 code point, which displays correctly as o-acute on the CP437 configured
client, and the end user sees what was entered before. But with a different application
configured properly with CP1252 and DB client codeset, the end user will see the cent currency
sign instead of the o-acute character.