Source: http://forum.ubuntu.org.cn/viewtopic.php? F = 48 & amp; T = 380247
Problem description:
In ubuntu 12.04, enter win7's scripts and open the. txt file with gedit. Chinese characters are not displayed normally and are garbled.
Cause:
On the UBUNTU Forum's Chinese wiki, find the reason:
"By default, garbled characters will appear when you use the Ubuntu Text Editor (gedit) to open Chinese-encoded text files of the gb18030, GBK, and gb2312 types.
This is because gedit uses an encoding matching list. Only the encoding in this list is matched. Encoding not in this list is garbled. All you need to do is add gb18030 to this matching list ."
Solution:
Enter the following two commands in the terminal:
Gsettings
Set org. gnome. gedit. preferences. encodings auto-detected "['gb18030 ',
'Gb2312', 'gbk', 'utf-8', 'big5', 'stream', 'utf-16'] "gsettings
Set org. gnome. gedit. preferences. encodings shown-in-menu "['gb18030 ',
'Gb2312', 'gbk', 'utf-8', 'big5', 'stream', 'utf-16']"