阿里云 centos vim 显示中文 乱码

开始以为是vim 设置编码的问题 :网上搜  改 .vimrc    无效!!!

后转战  是不是系统里面没有中文字体 

1、先从你本机 C:\Windows\Fonts 拷贝或者网络上下载你想要安装的字体文件(*.ttf文件)到/usr/share/fonts/chinese/TrueType 目录下(如果系统中没有此目录,则自行mkdir创建,亦可重命名为自己喜欢的文件夹名)
2、修改字体文件的权限,使root用户以外的用户也可以使用
# cd /usr/share/fonts/chinese/TrueType
# chmod 755 *.ttf
3、建立字体缓存
# mkfontscale (如果提示 mkfontscale: command not found,需自行安装 # yum install mkfontscale )
# mkfontdir 
# fc-cache -fv (如果提示 fc-cache: command not found,则需要安装# yum install fontconfig )
4、重启计算机
# reboot

 没有效果。

 

再转战

#yum groupinstall chinese-support

console终端也必须设置为utf8编码
1、console终端乱码

在/etc/profile文件的最后一行添加如下内容:

export LC_ALL="zh_CN.utf8"

 重启

 

可以了   花了一下午的时间。

posted @ 2016-01-21 16:37  3000  阅读(1578)  评论(0编辑  收藏  举报