In Ubuntu 12, where the Chinese support configuration is not complete, using gedit to open files with Chinese characters sometimes results in garbled characters.
Reason: gedit does not match the character encoding correctly,
Solution:
Enter the following command in the terminal, and then reopen gedit:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"