1, view the current system default character set used:
# locale
In RedHat / CentOS system, the default language of the documentation system is / etc / sysconfig / i18n, if the default installation is the Chinese system, i18n reads as follows:
LANG="zh_CN.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
So how to display Chinese?
1. The system must install Chinese language pack for the job
# yum -y groupinstall chinese-support
2. There are only a language pack is not enough, we have to set the appropriate character set
2.1 provisional entry into force:
# Export LANG = "zh_CN.UTF-8 " # set to Chinese # export LANG = "en_US.UTF-8 " # set to English
2.2 permanent, edit / etc / sysconfig / i18n (preferably reboot it)
LANG="zh_CN.UTF-8"
2.3 Alternatively, edit / etc / profile configuration file, add the following line
export LANG="zh_CN.UTF-8"
Reload:
# . /etc/profile
View the current character set:
# Echo $ LANG
After the above settings, character set should be set up.
View: