Enabling SHIFT-JIS

By default, support for the character encoding for the Japanese language, Shift-JIS, is not available on Ubuntu and on RedHat OS version 8 or later.

You need to generate the Shift JIS locale on your machine to be able to execute Shift-JIS applications on these platforms. You can do this as follows:

  1. On RedHat 8, ensure that the glibc-locale-source package is installed.
  2. Execute the following command with superuser rights in order to generate a Shift-JIS locale using the charset:
    sudo localedef -f SHIFT_JIS -i ja_JP ja_JP.sjis
  3. Set the COBUTF8 environment variable to the generated Shift-SJIS locale and LANG to a UTF8 locale:
    export COBUTF8=ja_JP.sjis
    export LANG=ja_JP.UTF-8
  4. Run the cobutf8 utility:
    cobutf8 <command>

    See your product documentation for more details about cobutf8.