cat:
vim:
1、临时解决
vim 文件后,命令模式下执行:
:set encoding=utf-8
2、永久解决
vi 配置文件路径:/etc/virc
vim 配置文件路径:/etc/vimrc
【
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif
】
修改为
【
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=utf-8,ucs-bom,latin1,cp936,gb2312
set termencoding=utf-8
set encoding=utf-8
endif
】