CentOS 7字符集的问题与6有点区别,会出现下面问题,查看是中文,vi进入就变成乱码了 生产中修改配置文件 [root@ce1d2002a999 ~]# cat /etc/locale.conf LANG="zh_CN.UTF-8" 改为中文字符集 然后在查看更改后的系统语言变量 [root@5c46832b5c01 ~]# locale locale: Cannot set LC_CTYPE to default locale: No such file or d
Each time I SSH to my Fedora Server, the locale setting is not right. $ locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: ??? LC_ALL ????????: ????????? LC_CTYPE=UTF-8 LC_NUMERIC="zh_CN.UTF-8" LC_TIME="
1.centos7安装vim yum -y install vim(简单粗暴安装方法) 2.在vim中显示中文不出现乱码 (1).vim ~/.vimrc (~/.vimrc为vim配置文件) (2).输入: set fileencodings=utf-8,gb2312,gbk,gb18030 set termencoding=utf-8 set fileformats=unix set encoding=prc 3.~/.vimrc ~表示root目录 .表示隐藏文件 ls -a /root/