作者:兰陵殇lu_734_168 | 来源:互联网 | 2014-06-02 23:14
远程shell中文显示乱码的解决办法系统类型RedHatAS5U2x86_64系统,已经能够安装了中文语言包x界面打开终端执行[root@WwliuPublic~]#localeLANGzh_CN.UTF-8LC_CTYPEzh_CNLC_NUMERICzh_CN.UTF-8LC_TIMEzh...
远程shell中文显示乱码的解决办法
系统类型RedHat AS5U2 x86_64系统,已经能够安装了中文语言包
x界面打开终端执行
[root@WwliuPublic ~]#locale
LANG=zh_CN.UTF-8
LC_CTYPE=zh_CN
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8
LC_COLLATE=zh_CN.UTF-8
LC_MOnETARY=zh_CN.UTF-8
LC_MESSAGES=zh_CN.UTF-8
LC_PAPER=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHOnE=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL= www.2cto.com
显示如上!
打开远程终端工具xshell 显示中文乱码
解决方法:
1.在xshell中执行locale
(FUDE-0.4.2@x86_64)[root@WwliuPublic ~]#locale
LANG=zh_CN
LC_CTYPE=zh_CN
LC_NUMERIC="zh_CN"
LC_TIME="zh_CN"
LC_COLLATE="zh_CN"
LC_MOnETARY="zh_CN"
LC_MESSAGES="zh_CN"
LC_PAPER="zh_CN"
LC_NAME="zh_CN"
LC_ADDRESS="zh_CN"
LC_TELEPHOnE="zh_CN"
LC_MEASUREMENT="zh_CN"
LC_IDENTIFICATION="zh_CN"
LC_ALL=
显示如上 www.2cto.com
2.修改配置
/root/.bash_profile
export LANG=zh_CN.UTF-8
export LC_CTYPE=zh_CN
export LC_NUMERIC="zh_CN.UTF-8"
export LC_TIME="zh_CN.UTF-8"
export LC_COLLATE="zh_CN.UTF-8"
export LC_MOnETARY="zh_CN.UTF-8"
export LC_MESSAGES="zh_CN.UTF-8"
export LC_PAPER="zh_CN.UTF-8"
export LC_NAME="zh_CN.UTF-8"
export LC_ADDRESS="zh_CN.UTF-8"
export LC_TELEPHOnE="zh_CN.UTF-8"
export LC_MEASUREMENT="zh_CN.UTF-8"
export LC_INDENTIFICATION="zh_CN.UTF-8"
export LC_ALL=
与x界面保持一致
解决!