linux6.5中文设置,1.01_CentOS6.5解决中文显示乱码方法

>[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)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值