添加中文字符编码:
1
|
sudo vi /var/lib/locales/supported.d/local |
添加下面的中文字符集:
1
2
3
|
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.GB18030 GB18030 |
使其生效:
1
|
sudo dpkg-reconfigure locales |
vim:
打开vim的配置文件,在其中加入:
1
2
3
|
set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
set encoding=utf-8 |
使其生效:
gedit:
方法1:
1
|
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8','GB18030','GB2312','GBK','BIG5','CURRENT','UTF-16']" |
方法2:
1
|
gconf-editor (sudo apt-get install gconf-editor) |
选择 apps->gedit2->preferences->encodings,添加需要的字符集