Chinaunix
标题:
SSH连接Ubuntu时的中文乱码问题
[打印本页]
作者:
tdh2002
时间:
2009-05-22 14:34
标题:
SSH连接Ubuntu时的中文乱码问题
若使用 Ubuntu 中文系统,其默认将使用 UTF-8 作为字符集:
QUOTE:
$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
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=
而通常中文 Windows 系统使用的是 GB2312 或 GB18030,这时从中文 Windows 系统通过诸如 SSH Secure Shell, PuTTY 等工具登陆 Ubuntu 就会发现所有的中文都不能正常显示。
如果使用的是 PuTTY,可以通过修改 font, character set 设置来解决。
Window -> Appearance -> Font settings 选择宋体或新宋体:
Click here to open new window
Window -> Translation -> Character set translation on received data 选择 UTF-8:
本文来自ChinaUnix博客,如果查看原文请点:
http://blog.chinaunix.net/u1/43090/showart_1935422.html
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2