First, we need to know that the language environment variables for controlling Linux OS are $ Lang and $ lc_all. To solve the garbled problem, we only need to set the above two variables correctly.
Garbled characters can be divided into two situations:
1. Terminal (pure Shell Interface) garbled characters
VI/etc/profile <br/> export lc_all = "zh_cn.gb18030: zh_cn.gb2312: zh_cn.gbk: zh_cn: en_US.UTF-8: en_us: EN: Zh: zh_tw: zh_cn.big5"
Save and exit. restart the system.
2. garbled characters in the X-window (graphic interface)
VI/etc/sysconfig/i18n <br/> lang = "zh_cn.gb18030: zh_cn.gb2312: zh_cn.gbk: zh_cn: en_US.UTF-8: en_us: EN: Zh: zh_tw: zh_cn.big5 "<br/> Language =" character: zh_cn.gbk: zh_cn: en_US.UTF-8: en_us: EN: Zh: zh_tw: zh_cn.big5 "<br/> supported =" character: zh_cn: en "<br/> sysfont =" lat0-sun16 "<br/> sysfontacm =" 8859-15"
Save and exit. restart the system.
Note:
This article Reprinted from: http://bbs.51cto.com/thread-639468-1.html
Http://www.360doc.com/content/10/1117/11/2614615_70068186.shtml