SSH connection to Linux often encounter garbled situation, painful for a long time, find a solution on the Internet, edit the ~/.bash_profile file, add the following two lines:
Lang= "ZH_CN. GB18030 "
Language= "ZH_CN. GB18030 "
After a period of time to find that this change in the VI is normal display in Chinese, but other places are garbled, such as restart services. In order for all interfaces to display Chinese correctly, you need to edit the/etc/sysconfig/i18n, the original lang= "ZH_CN. UTF-8 "comment out, add the following four lines:
Lang= "ZH_CN. GB18030 "
Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"
Supported= "ZH_CN. GB18030:zh_CH:zh:en_US. Utf-8:en_us:en "
Sysfont= "Lat0-sun16"
This will display the Chinese as normal in all interfaces.
BTW: After I test, in Rhel5u3 and CentOS5.2, only need to/etc/sysconfig/i18n lang= "ZH_CN. UTF-8 "Change to lang=" zh_cn.gb18030 "can all normal display Chinese , other systems temporarily unclear, and so on when you meet
Below is the red flag system under the i18n settings, paste it here, after the spare.
Lang= "ZH_CN. GB18030 "
Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"
Supported= "en_US. Utf-8:en_us:en:zh_cn. GB18030:zh_CN:zh:zh_TW.big5:zh_TW:zh:ja_JP. Utf-8:ja_jp:ja:ko_kr.euckr:ko_kr:ko "
Sysfont= "Lat0-sun16"
Sysfontacm= "8859-15"
Linux Terminal garbled solution