The system support code is modified as follows:
1. Use the following command to view the character set supported by the system
cat/usr/share/i18n/supported
Description: To see the character sets supported by the system, you need to be aware of the format that supports character sets, such as the following display for Chinese (my system is so, I don't know if it is common)
Zh_cn. GB18030 GB18030
Zh_cn. GBK GBK
Zh_cn. UTF-8 UTF-8
ZH_CN GB2312
2.
sudo vim/var/lib/locales/supported.d/local
Description: Opens the system character set configuration file and adds the supported Chinese character set to the format shown in 1.
3.
sudo locale-gen
Description: Update.
If 2 is added correctly there should be no problem if the problem is edited again after 2, then 3 until resolved.
If correct at this time should be able to use VIM to view GBK encoded files, no encoding.
But this time with gedit is not possible, now we add gedit character set support.
1.
Gconf-editor
Open the Gnome configuration Editor
2.
App/gedit/preferences/encodings
modifying key values
auto_detected
Add Add gbk,gb2312,gb18030
If the operation is successful now gedit is not garbled.
How Ubuntu modifies character set encoding