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.
LANG=en_US.utf-8 LC_ALL=en_US.utf-8Where 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 Message Broker you must add it by Generating a new code page converter.