Application locale

The application locale defines the language and codeset for your application.

The application locale defines:
  • The language (for messages),
  • The country or territory (for currency symbols and date formats),
  • The code set (for character set encoding).

A program needs to be able to determine its locale and act accordingly, to support different languages and character sets.


The same code point can represent distinct glyphs in different characters sets. Even if the glyphs/characters seem to display properly on the screen, an invalid locale configuration in one of the software components will result in invalid characters in your database system.

Take for example a client application 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 the user enters the o-acute char (0xA2 in CP437) in the database, it will actually be interpreted 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 client application configured properly with CP1252 as DB client codeset, the end user will see the cent currency sign instead of the o-acute character.