Symptoms:
When you use CentOS, you may encounter CentOS in English. In this case, CentOS is installed by default (in English ). After installation, Chinese characters are garbled on the Internet.
Solution:
Go to CentOs resource website to find fonts-chinese-3.02-12.el5.noarch.rpm (Chinese Character pack) and fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm (Font Pack)
The following is the package address of Version 5.5 (I installed version 5.5 i386)
Ftp://ftp.muug.mb.ca/mirror/centos/5.5/ OS /i386/CentOS/fonts-chinese-3.02-12.el5.noarch.rpm
Ftp://ftp.muug.mb.ca/mirror/centos/5.5/ OS /i386/CentOS/fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
If you are using another version, find it at ftp://ftp.muug.mb.ca/#/centos.
After the download, install it on the command line:
# Rpm-ivh XXXX (XXXX indicates the full names of the above two packages. If rpm is not used, go to google)
After the CentOS system is installed, restart it.
Terminal and gedit display garbled characters
# Vi/etc/sysconfig/i18n
Set LANG = "en_US.UTF-8"
SYSFONT = "latarcyrheb-sun16"
Modify the original content
LANG = "zh_CN.GB18030"
LANGUAGE = "zh_CN.GB18030: zh_CN.GB2312: zh_CN"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "lat0-sun16"
Use yum to install Chinese Fonts
# Yum install fonts-chinese.noarch
System-> logout
When you log on to the CentOS system again, you will find that all interfaces have changed from English to Chinese. Enter the date command on the terminal to test
# Date
Monday, March 8, 2011 20:17:00 CST
Solutions to garbled Chinese characters in the telnet terminal over ssh
# Vi/etc/sysconfig/i18n
Set the original content LANG = "en_US.UTF-8"
SYSFONT = "latarcyrheb-sun16"
Change
LANG = "zh_CN.GB18030"
LANGUAGE = "zh_CN.GB18030: zh_CN.GB2312: zh_CN"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "lat0-sun16"
Use yum to install Chinese Fonts
# Yum install fonts-chinese.noarch
Disconnect ssh and reconnect
Enter the date command on the terminal to test
# Date
Monday, March 8, 2011 20:27:00 CST