How To: Set the default system locale
You can specify a locale to tell the operating system how to process and present information in a way appropriate for your language, country, and cultural customs.
Generally, a locale consists of three parts: language, territory, and codeset. Language specifies the native language (English). Territory specifies a geographic entity (United States). Codeset specifies the coded character set for the locale (ISO-8859-1). While Java uses Unicode as its internal character set, operating systems still use a region specific codepage (specified by locale) to represent text. The Java Virtual Machine assumes the default system locale is used when executing or utilizing a Java application; thus, when the ArcIMS Application Server (Java application) facilitates communication between clients and spatial servers, it uses the default locale used by the Java Virtual Machine to render and recognize textual information, namely ArcXML.
To view the current locale settings being used by ArcIMS, enable the debug option for the ArcIMS Application server and start the service. Do not start ArcIMS Monitor or Tasker. In addition to general startup information, the log file (or console window) will display two lines like these:
[Mon Dec 24 00:39:43 PST 2001] main> Java Virtual Machine's character encoding: Cp1252
[Mon Dec 24 00:39:43 PST 2001] main> Default locale is en_US : English (United States).
This information will indicate the default locale settings used by ArcIMS. In this example, the language is English, the territory is the United States, and the codeset is Cp1252.
In order to change and configure the default system locale for ArcIMS, do the following:
1. Click Start > Settings > Control Panel. Double-click Regional Settings (or Regional Options).
2. Select the appropriate language (locale) from the drop-down list. Each language specifies a territory, and each language-territory combination has a preset codeset using a Windows specific definition, which cannot be changed. The precise locale can be retrieved as the LCID (Locale ID) using ASP or Java applications. See Related MSDN link for additional information.
If a language (locale) is not available in the dropdown list, the language must be installed from the operating system CDs. Install the appropriate <language>.inf file and reboot the computer. See related Microsoft link.
3. Click the Set Default button and reboot the computer.
4. Restart the ArcIMS services.
1. Use the 'locale' command to list the current locale settings for the session. For example:
The variables returned describe the following:
¤ LANG: specifies the locale to use for all purposes except as overridden by the variables below.
¤ LC_CTYPE: determines the effect of character handling functions.
¤ LC_NUMERIC: determines the decimal point character and thousands separator character.
¤ LC_TIME: determines the date/time format.
¤ LC_COLLATE: determines the order in which the output is sorted.
¤ LC_MONETARY: determines the format for monetary symbols.
¤ LC_MESSAGES: determines the format of standard operating system messages.
¤ LC_ALL: used to set a single locale for all purposes, overrides all variables listed above.
2. Install additional locales using the upgrade option and specific directions for each respective system. Note that the 'locale -a' command will list all installed locales on the system. See related Sun and IBM links.
3. Log on as root and change/add the appropriate variables in the /etc/default/init file (Solaris) or /etc/environment file (AIX). See variables listed above. Be sure to set the variables for a locale available on the system.
4. Change the default font for the locale. This must be done as root.
a. Use the command 'lsfont' to list the available fonts (located in /usr/lpp/fonts).
b. Use the command 'chfont' to select the appropriate font.
See the command man-pages for additional information.
c. Reboot the computer.
a. Log on using the ArcIMS administrator account.
b. Set the font path for the appropriate locale:
xset fp+ /usr/openwin/lib/locale/<locale_name>/X11/fonts/75dpi
c. If using a multibyte locale, such as Japanese, set up the htt server using the following command:
/usr/openwin/bin/htt -lc_basiclocale <locale_name>
All UNIX platforms
5. Restart the ArcIMS daemons.
- Microsoft: How To Add and Enable Additional Languages
- W3C Documents: Locales and Character Sets
- Unicode: Character Encoding and Mapping