Reason: I installed centos 5.3 on the virtual machine. I chose English when I first installed it. Later, I found that Chinese characters are garbled and cannot be properly displayed when I opened the webpage. Of course, Chinese characters in local files cannot be displayed. If you set the system language to Chinese, the entire system is garbled.
When Google came to Baidu on the internet, reboot went countless times, but it never worked. Only later found this article: http://blog.csdn.net/neverup_/article/details/6443669 really solve the problem. Of course: http://www.xxlinux.com/linux/article/accidence/install/20100330/18150.html this article on centos garbled problem summary is more comprehensive.
To sum up, the steps to solve Chinese Garbled text in the system are as follows:
1. Find the two packages on the CD and install them in Chinese.
Fonts-chinese-3.02-9.6.el5.noarch.rpm
Fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
There are many rpm packages under the cenos directory of the CD, find them, copy them out, and then upload them to centos through the SSH Secure File Transfer software. Run the rpm-IVH command.
Or simpler: You can use the following command to install it (network connection required ):
Yum-y install fonts-Chinese
Yum-y install fonts-ISO8859
Install the Chinese Input Method:
Command Line input:
Yum install scim
Yum install scim-pinyin
2. Edit this file: VI/etc/sysconfig/i18n (Note: whether the second step must be completed is to be verified, so that the second step can be achieved)
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"
3.Key steps: Run the following two statements on the command line: CD/usr/share/fonts/
FC-Cache-FV
After FC-Cache-FV is executed.
4. log out. Logout. Then log on again.