>[info]###CentOS6.5 中文乱码解决方法
作者 : fankey <6424051@qq.com>
时间 : 2015-10-02
####说明 :为什么CentOS6.5下会出现中文乱码?
`Windows的默认编码为GBK,Linux的默认编码为UTF-8。在Windows下编辑的中文,在Linux下显示为乱码。``为了解决此问题,需要将修改Linux的默认编码为GBK。`
###`1.首先查看系统支持的字体集`
`locale -a`
![document/2015-10-02/560e1ff005666](https://box.kancloud.cn/document_2015-10-02_560e1ff005666.png)
###`2.查询系统当前所用的字体`
`cat /etc/sysconfig/i18n`
![document/2015-10-02/560e22a1d2c0c](https://box.kancloud.cn/document_2015-10-02_560e22a1d2c0c.png)
###`3.修改系统的字体`
`vi /etc/sysconfig/i18n`
![document/2015-10-02/560e2231b1563](https://box.kancloud.cn/document_2015-10-02_560e2231b1563.png)
`将系统英文字体 : `
`LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"`
`修改为 : `
`LANG="zh_CN.GBK"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"`
![document/2015-10-02/560e244a16be4](https://box.kancloud.cn/document_2015-10-02_560e244a16be4.png)
###` 4.执行如下命令或者重启即可生效`
`source /etc/sysconfig/i18n`
![document/2015-10-02/560e24e07b557](https://box.kancloud.cn/document_2015-10-02_560e24e07b557.png)