The system default encoding of the RedHat Linux system (centos) does not contain shift-JIS, so
To use Shift-JIS encoding in RedHat Linux
Command line:
1) localedef-F shift_jis-I ja_jp ja_jp.sjis
2) check whether the shift-JIS encoding is appended.
Locale-A | grep ja
The following output should be available:
Ja_jp
Ja_jp.eucjp
Ja_jp.sjis
Ja_jp.ujis
Ja_jp.utf8
Japan
Japan. euc
3) set Lang Environment Variables
A. valid only for the current session
Export lang = ja_jp.sjis
B. globally valid
Lang = "ja_jp.sjis"
Supported = "ja_jp.sjis: ja_jp: Ja"
Sysfont = "latarcyrheb-sun16"
4) after saving the settings, restart the machine.
Other encoding formats:
1. euc_jp settings
Lang = "ja_jp.eucjp"
Supported = "ja_jp.eucjp: ja_jp: Ja"
2. settings of UTF-8
Lang = ja_JP.UTF-8"
Supported = "ja_JP.UTF-8: ja_jp: Ja"
Modify the Lang value. If you want to change it to global
Modify the/etc/sysconfig/i18n file as the root user.