Xshell和Xftp中文乱码解决办法

现象

如下所示,在Xshell和Xftp中都出现了中文乱码的现象。

Xshell

[[email protected] ~]# ls -l
total 5852
-rw-r--r--  1 root root 1150232 Sep  2  2015 Linux涓€?..瑁.eb?.?浣跨.?.?.pdf
-rw-r--r--  1 root root 1899007 Sep  2  2015 Linux涓€?..瑁.eb?.??ㄦ.??pdf

Xftp

Xshell和Xftp中文乱码解决办法

解决方法

需要对Xshell终端和Xftp终端的编码进行设置,并保持一致。
1. 打开Xshell-文件-属性-终端,将编码设置为Unicode (UTF-8),点击确定。
Xshell和Xftp中文乱码解决办法
2. 打开Xftp-文件-属性,选中“使用UTF-8编码”,点击确定。
Xshell和Xftp中文乱码解决办法
修改完成。

效果

Xshell

执行ls -l查询文件。

[[email protected] ~]# ls -l
total 5852
-rw-r--r--  1 root root 1150232 Sep  2  2015 Linux一键安装web环境使用教程.pdf
-rw-r--r--  1 root root 1899007 Sep  2  2015 Linux一键安装web环境全攻略.pdf

Xftp

修改Xftp设置后,点击刷新。
Xshell和Xftp中文乱码解决办法
结束