Hitachi

JP1 Version 12 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

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

zh_CN.utf8

English

C

C

Solaris

Japanese

SJIS

ja_JP.PCK

EUCJIS

  • In Solaris 10 or earlier:

    ja or japanese

  • In Solaris 11 or later:

    ja or ja_JP.eucJP#2

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#3

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, 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#4

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

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: If JP1/Base is newly installed in an environment where the OS is Solaris 11 or later, the language set for jp1bs_env.conf will be ja.

#3: In Solaris 10 or earlier, this encoding is supported only by the log file trapping function. Log file trapping can be used to monitor UTF-8-encoded log data. In Solaris 11 or later, this encoding is supported by all functions of JP1/Base.

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

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.