<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="解决Xshell中不能中文乱码、按退格及删除键的教程" id="card1">
<p> 游客</p><p>
标题:解决Xshell中不能中文乱码、按退格及删除键的教程<br/>
正文:<br/>
一直用putty连接linux的vps，前几天开始接触Xshell，还是觉得这个工具比较方便。用 Xshell 连接 linux 系统时，显示数据到控制台，中文竟然为乱码。执行 echo $LANG 命令输出：zh_CN.UTF-8，执行 locale 命令，输出LANG=zh_CN.UTF-8  LC_CTYPE=&quot;zh_CN.UTF-8&quot;  LC_NUMERIC=&quot;zh_CN.UTF-8&quot;  LC_TIME=&quot;zh_CN.UTF-8&quot;  LC_COLLATE=&quot;zh_CN.UTF-8&quot;  LC_MONETARY=&quot;zh_CN.UTF-8&quot;  LC_MESSAGES=&quot;zh_CN.UTF-8&quot;  LC_PAPER=&quot;zh_CN.UTF-8&quot;  LC_NAME=&quot;zh_CN.UTF-8&quot;  LC_ADDRESS=&quot;zh_CN.UTF-8&quot;  LC_TELEPHONE=&quot;zh_CN.UTF-8&quot;  LC_MEASUREMENT=&quot;zh_CN.UTF-8&quot;  LC_IDENTIFICATION=&quot;zh_CN.UTF-8&quot;  LC_ALL=   说明Linux系统的编码为 UTF-8，要让 Xshell 不显示乱码就需要将 Xshell 的编码方式改为 UTF-8。    [文件]&amp;ndash;&amp;gt;[打开]&amp;ndash;&amp;gt;在打开的session中选择连接的那个 ,点击properties -&amp;gt; [Terminal ] ,在右边的translation先选择utf8，然后重新连接服务器即可。     或者也可以在xshell的工具栏里面点击&amp;rdquo;Encoding&amp;rdquo;按钮，选择utf8编码即可。 修改后能正常显示中文：  还有一个问题就是在输入命令时，如果敲错字母了的时候，想通过按退格键删除敲错的字母，却在屏幕显示出了&amp;ldquo;^H&amp;r<br/><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=422&amp;Page=1">[&lt;&lt;]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=422&amp;Page=1">[[1]]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=422&amp;Page=2">[2]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=422&amp;Page=2">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=422">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=422">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://camnpr.com/wap.asp">首页</a>
</p>
</card>
</wml>