3.4.1 Setting the language (UNIX only)
The language used by JP1/Base is set in the LANG environment variable.
Keep the following in mind when setting the language used by JP1/Base:
-
Use the same encoding as JP1/Base for products on the same host (such as JP1/IM and JP1/AJS) that use JP1/Base.
-
When using JP1/Base in a UTF-8 locale, use one of the following setup scenarios system-wide:
-
Upgrade all instances of JP1/Base to version 8 or later, and make sure that all products for which JP1/Base is a prerequisite are compatible with UTF-8 encoding.
-
If there are computers in your system running version 7 of JP1/Base, JP1 events issued in UTF-8 locales cannot be processed correctly. Make sure that each instance of JP1/Base in a UTF-8 locale is version 8 or later, and configure JP1/Base to run in character code compatibility mode.
-
-
In Linux environments, UTF-8 (Japanese) encoding is the default language setting for new installations of JP1/Base version 8 or later.
-
In the automatic startup and automatic termination settings, the LANG environment variable is set to C by default. Change it if necessary.
-
In the following cases, you must specify Japanese as the language of the LANG environment variable in the automatic start script.
-
When Japanese is specified in the event filter of the forward settings file (forward)
-
When Japanese is specified in the lpszFilter parameter of the JP1 event acquisition function (JevGetOpen) in the user program
-
When Japanese is specified in various JP1/IM filters in JP1/IM#
#: For detailed conditions of servers that require language specification, see the Job Management Partner 1/Integrated Management - Manager Overview and System Design Guide.
-
The following table shows the encodings available in each operating system, and the corresponding LANG value.
OS |
Language |
Encoding |
Value of LANG |
---|---|---|---|
HP-UX |
Japanese |
SJIS |
ja_JP.SJIS or japanese |
EUCJIS |
ja_JP.eucJP or japanese.euc |
||
UTF-8 |
ja_JP.utf8 |
||
Chinese |
GB18030 |
zh_CN.gb18030 |
|
UTF-8 |
zh_CN.utf8 |
||
English |
C |
C |
|
Solaris |
Japanese |
SJIS |
ja_JP.PCK |
EUCJIS |
|
||
UTF-8 |
ja_JP.UTF-8 |
||
Chinese |
GB18030 |
zh_CN.GB18030, zh_CN.GB18030@pinyin, zh_CN.GB18030@radical, or zh_CN.GB18030@stroke |
|
UTF-8 |
zh.UTF-8, zh_CN.UTF-8, zh_CN.UTF-8@pinyin, zh_CN.UTF-8@radical, or zh_CN.UTF-8@stroke |
||
English |
C |
C |
|
AIX |
Japanese |
SJIS |
Ja_JP.IBM-932 or Ja_JP |
EUCJIS |
ja_JP.IBM-eucJP or ja_JP |
||
UTF-8 |
JA_JP.UTF-8 or JA_JP |
||
Chinese |
GB18030 |
Zh_CN or Zh_CN.GB18030 |
|
UTF-8 |
ZH_CN or ZH_CN.UTF-8 |
||
English |
C |
C |
|
Linux |
Japanese |
SJIS |
Not used |
EUCJIS |
Not used |
||
UTF-8 |
ja_JP.UTF-8 or ja_JP.utf8 |
||
Chinese |
GB18030 |
zh_CN.GB18030 or zh_CN.gb18030 |
|
UTF-8 |
zh_CN.UTF-8 or zh_CN.utf8 |
||
English |
C |
C |
- Organization of this subsection
(1) Setting the language for JP1/Base
-
Edit the jp1bs_env.conf file.
Open the /etc/opt/jp1base/conf/jp1bs_env.conf file in an editor, and set the value of the LANG environment variable with reference to Table 3-3. The setting takes effect the next time JP1/Base starts.
-
Edit the jp1bs_param.conf file.
Open the /etc/opt/jp1base/conf/jp1bs_param.conf file in an editor, and delete the line that starts with "JP1_BIND_ADDR". Then, for the character encoding to be specified "LANG"="character encoding", specify a character encoding listed in Table 3-3.
-
Save the file, and then execute the following command as a superuser or a JP1/Base administrator:
/opt/jp1base/bin/jbssetcnf /etc/opt/jp1base/conf/jp1bs_param.conf
-
Edit the automatic start script (jbs_start).
To use the automatic start script (jbs_start), set the LANG environment variable to the same language specified in jp1bs_env.conf in step 1.
If you manually start an event service without using the automatic start script (jbs_start), locale information used when the event service is started (for example, the LANG environment variable) must match the language specified in jp1bs_env.conf.
In the default settings for automatic startup script (jbs_start), the LANG environment variable is set to C as follows:
## Set Environment-variables PATH=/sbin:/bin:/usr/bin:/opt/jp1base/bin LANG=C SHLIB_PATH=/opt/jp1base/lib:/opt/hitachi/common/lib
If, for example, you specify ja_JP.UTF-8 as the language for jp1bs_env.conf, change the LANG environment variable of the automatic startup script (jbs_start) as follows:
## Set Environment-variables PATH=/sbin:/bin:/usr/bin:/opt/jp1base/bin LANG=ja_JP.UTF-8 SHLIB_PATH=/opt/jp1base/lib:/opt/hitachi/common/lib
To run JP1/Base in a cluster system, similarly change the value of the LANG environment variable of jbs_start.cluster to match the language specified in jp1bs_env.conf for the logical host.
(2) Setting character code compatibility mode
-
Create the file jbslm_setup.conf by copying the model file (jbslm_setup.conf.model).
- Location of jbslm_setup.conf.model:
-
/etc/opt/jp1base/conf/
- Parameter:
-
The format of the parameter is as follows:
[JP1_DEFAULT\JP1BASE\]
"LANG_MODE"=dword:{00000000 | 00000001}
0: Do not use character code compatibility mode.
1: Use character code compatibility mode. The system converts characters from UTF-8 (Japanese) to EUC (Japanese) encoding.
On a logical host, replace JP1_DEFAULT with the logical host name.
-
Execute the jbssetcnf command.
For details on the jbssetcnf command, see jbssetcnf in 15. Commands.
-
Restart JP1/Base.