Changing your locale on UNIX and Linux systems

You can change your system locale on UNIX and Linux systems.
There are many environment variables that control the locale. These can be defined system-wide, in your environment, or on a per-session basis:
LC_ALL
Overrides all LC_* environment variables with the given value
LC_CTYPE
Character classification and case conversion
LC_COLLATE
Collation (sort) order
LC_TIME
Date and time formats
LC_NUMERIC
Non-monetary numeric formats
LC_MONETARY
Monetary formats
LC_MESSAGES
Formats of informative and diagnostic messages, and of interactive responses
LC_PAPER
Paper size
LC_NAME
Name formats
LC_ADDRESS
Address formats and location information
LC_TELEPHONE
Telephone number formats
LC_MEASUREMENT
Measurement units (Metric or Other)
LC_IDENTIFICATION
Metadata about the locale information
LANG
The default value. This is used when either LC_ALL is not set, or an applicable value for LC_* is not set
NLSPATH
Delimited list of paths to search for message catalogues
TZ
Time zone

LC_MESSAGES and NLSPATH are the most important variables to the broker. These variables define the language and location of response messages that the broker uses. The broker profile file, mqsiprofile, sets NLSPATH. Either you, or your system must set LC_MESSAGES. The value set in LC_MESSAGES must be a value that the broker recognizes. LC_CTYPE is also important to the broker because it defines the character conversion that the broker performs when interacting with the local environment.

If you use common desktop environment (CDE), use this to set the locale instead of setting LANG and LC_ALL directly. The NLSPATH variable respects either method. Before setting the code page, check that it is one of the Supported code pages.

For example, to set WebSphere Event Broker to run in a UTF-8 environment set the following values in the profile:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
Where en_US sets the language, and utf-8 sets the code page.

You can use the executable locale to show your current locale. The command locale -a displays all the locales currently installed on the machine. Make sure that the locale you select for LANG and LC_ALL is in the list that locale -a returns. The values that locale uses and returns are case-sensitive, so copy them exactly when assigning them to an environment variable.

When you start a broker component, the locale of that component is inherited from the shell in which it is started. The broker component uses the LC_MESSAGES environment variable as the search path in the NLSPATH environment variable (LC_MESSAGES is set when variable LC_ALL is exported).

Messages are sent to the syslog in the code page set by this locale. If you have multiple brokers that write to this syslog, their messages are in the code page of the locale in which they were started, for example:

locale syslog code page ccsid
pt_BR iso8859-1 819
Pt_BR ibm-850 850
PT_BR utf-8 1208

Set the locale of the user ID that runs the syslog daemon to one that is compatible with the locales of all brokers that write to the syslog on that system, for example, utf-8. You can do this by setting the default locale. On Solaris, set the LANG and LC_ALL variables in /etc/default/init. On AIX and Linux, these variables are in /etc/environment. This task is not required on HP-UX.

For full time zone support in the broker, set the TZ variable using Continent/City notation. For example set TZ to Europe/London to make London, England the time zone, or set it to America/New_York to make New York, America the time zone.

If you want to add a new locale, refer to the operating system documentation for information on how to complete that task. If the code page of the new locale is not supported by WebSphere Event Broker you must add it by Generating a new code page converter.

Related tasks
Generating a new code page converter
Related reference
Supported processors
Operating system requirements
Supported code pages