27 Dec

Ubuntu: incorrect Chinese display

Ubuntu 16.04:Chinese characters display improperly. Old methods don’t work. We need some new methods.
For the system:
sudo vim /var/lib/locales/supported.d/zh-hans
add:
zh_CN.UTF-8 UTF-8
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN GB2312
zh_HK.UTF-8 UTF-8
zh_HK BIG5-HKSCS
zh_SG.UTF-8 UTF-8
zh_SG.GBK GBK
zh_SG GB2312
zh_TW.UTF-8 UTF-8
zh_TW.EUC-TW EUC-TW
zh_TW BIG5

to the file
(those lines were copied from /usr/share/i18n/SUPPORTED)

excecute:
sudo locale-gen

next: config vim:
sudo vi /etc/vim/vimrc
add:
let &termencoding=&encoding
set fileencodings=utf-8,gb18030,gbk,gb2312,big5

next: config gedit:
dconf-editor
in the tree, find:org/gnome/gedit/preferences/encodings
edit the value of candidate-encodings as [‘UTF-8’, ‘GB18030’, ‘GB2312’, ‘GBK’, ‘BIG5’, ‘CURRENT’, ‘UTF-16’]

Leave a Reply