I wrote the first csdn log today to commemorate it. Haha, start your own technology path. Haha ~~
1) gedit
. Run gconf-editor, modify the automatic detection encoding settings of gedit, and add several gb18030, gb2312, and GBK (gb18030 is compatible with gb2312 and GBK, so you only need to add one gb18030)
Under this option/apps/gedit-2/preferences/encodings/auto_detected
Me
The default encoding of the system is
UTF-8, after gb18030 is added. But be sure to put it in front of the locale supported by your system. See how to add gb18030
Locale support. Someone said that he called the function of the glib library to determine the encoding. If you do not install locale in your system, it may be a problem during detection.
Gb18030 put at the top of the line, because my system at first only UTF-8 support, so the first order
UTF-8, ISO-8859-15, gb18030
In this way, he still cannot recognize the gb18030 encoding.
UTF-8, gb18030, ISO-8859-15 as if.
2) Vim
Similarly, you can add set fencs = UTF-8, gb18030, ucs-bom, default, Latin1 to the/etc/Vim/gvimrc file.
This line allows the gvim editor to automatically detect the encoding. In gvim, click "edit"-"" set window "to view help.
From: http://blog.csdn.net/stephen_law/archive/2010/07/14/5733763.aspx