标签: putty shell

  • putty中文乱码问题解决

    ###putty中文乱码问题解决

     

    用putty从windows xp连接ubuntu server或者FreeBSD系统,其中中文部分乱码,经常遇到这个问题的时候,会觉得很郁闷。现共享一些解决这个问题的方法。

     

     

    ###方法一:

    打开putty主程序,选择window-〉Appearance-〉Font settings-〉Change Settings,选择Fixedsys字体,字符集选择CHINESE_GB2312。

    在window-〉Appearance-〉 Translation中,Received data assumed to be in which character set 中,把Use font encoding改为UTF-8

    如果经常使用,把这些设置保存在session里面.

    保存方法:再做完以上操作的同时选中以下两项:

    在window-〉Appearance-〉 Translation中,选中:TReat CJK ambiguous characters as wide和Caps Lock acts as Cyrillic switch即可。

     

    ###方法二:

    编辑/etc/sysconfig/i18n

     

    把第1句“LANG=”zh_CN.UTF-8″”改为“LANG=”zh_CN.GB18030″”,完成后保存重新登录即可。

     

    ##方法三:

    打开putty,登录成功后,在shell中输入

    # export LC_ALL= ‘zh_CN.utf8′

     

    # vi ~/.bash_profile

     

    LANG=zh_CN.GB18030

     

    LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN

     

    export LANG LANGUAGE