Hitachi

JP1 Version 13 JP1/Base User's Guide


3.4.2 Setting the language (for UNIX)

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:

The following table shows the encodings available in each operating system, and the corresponding LANG value.

Table 3‒5: Encodings and LANG environment variable values in UNIX

OS

Language

Encoding

Value of LANG

AIX

Japanese

SJIS

ja_JP.IBM-932 or Ja_JP

EUCJIS

ja_JP.IBM-eucJP or ja_JP

UTF-8

JA_JP.UTF-8, JA_JP, or ja_JP.UTF-8

Chinese

GB18030

Zh_CN or Zh_CN.GB18030

UTF-8#1

ZH_CN or ZH_CN.UTF-8

English

C

C

Linux

Japanese

SJIS#2

ja_JP.SJIS or ja_JP.sjis

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

UTF-8#3

en_US.UTF-8 or en_US.utf8

C

C

#1: This encoding is supported by only the log file trapping function. Log file trapping can be used to monitor UTF-8-encoded log data.

#2: This encoding is valid in only SUSE Linux.

#3: To apply the English UTF-8 encoding in Linux when upgrading from JP1/Base 13-00 or an earlier version, you must change the character code and language type mapping definition after the version upgrade installation is complete. For details, see (3) Changing the character code and language type mapping definition after installing a version upgrade.

Organization of this subsection

(1) Setting the language for JP1/Base

  1. 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-5. The setting takes effect the next time JP1/Base starts.

  2. Edit the jp1bs_param.conf file.

    For the encoding part of the "LANG"="encoding" entry, set the appropriate encoding as shown in Table 3-5.

    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.

  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
  4. 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.

    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.

  5. Start or restart JP1/Base.

    The new settings are applied when JP1/Base is started. If JP1/Base is running, restart it.

(2) Setting character code compatibility mode

  1. 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.

  2. Execute the jbssetcnf command.

    For details on the jbssetcnf command, see jbssetcnf in 15. Commands.

  3. Start or restart JP1/Base.

    The new settings are applied when JP1/Base is started. If JP1/Base is running, restart it.

(3) Changing the character code and language type mapping definition after installing a version upgrade

The English UTF-8 encoding has been added to the Linux character code and language type mapping definition in JP1/Base 13-00.

When upgrading from an earlier version than JP1/Base 13-00, perform the procedure described below to apply the character code and language type mapping definition added with JP1/Base 13-00 after installing the upgrade in order to maintain the character code and language type mapping definitions set before upgrading.

  1. Copy the model files (eventenc.dat.model and eventlng.dat.model) and create eventenc.dat and eventlng.dat.

    Execute the following commands to change each definition file.

    • Changing the character code mapping definition file

    cp -p /opt/jp1base/lib/eventenc.dat.model /opt/jp1base/lib/eventenc.dat
    • Changing the language type mapping definition file

    cp -p /opt/jp1base/lib/eventlng.dat.model /opt/jp1base/lib/eventlng.dat
  2. Start or restart the JP1/Base service, event service, and log-file trap management service.

    Start each service to enable settings. If a service has already been started, restart the service.