Ubuntu中文乱码问题
Ubuntu中文乱码问题
- 安装中文字体相关依赖:
sudo apt-get install language-pack-zh-hans
sudo apt-get install fonts-droid-fallback ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-ukai fonts-arphic-uming
/etc/environment追加内容:
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"
/var/lib/locales/supported.d/local追加内容:
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN GB2312
- 执行命令
locale-gen
~/.vimrc追加内容:
set encoding=utf-8
set fileencoding=utf-8

浙公网安备 33010602011771号