Cause analysis:
Gedit uses a code matching list, only the codes in this list will be matched, and the codes not in this list will be displayed as garbled codes. All you have to do is add GB 18030 to this matching list.
Command line mode, applicable to all Ubuntu users.
Copy the following command to the terminal, and then press enter:
Code example:
Gconftool-2-set-type = list-list-type = string/apps/gedit-2/preferences/encodings/auto _ detected "[utf-8, currently, GB 18030, BIG5-HKSCS, utf-/kloc-.
Graphic mode is suitable for Ubuntu users, not for KUbuntu/XUbuntu users.
You can follow the steps below to make your gedit display Chinese coded files correctly.
Press Alt-F2 to open the Run Application dialog box.
Type "gconf-editor" in the text box, and then press Enter to open the configuration editor.
Expand the tree node on the left, locate the/apps/gedit-2/preferences/encodings node and click it.
Double-click the auto_detected key on the right to open the Edit Key dialog box.
Click the "Add" button on the right side of the list, enter "GB 18030" and click the "OK" button.
Added a new "GB 18030" at the bottom of the list. Click it and click the "Up" button on the right until "GB 18030" is at the top of the list.
Click OK to close the Configuration Editor.
Gedit3.x version settings
Terminal input dconf editor
Expand org/gnome/gedit/preferences/encodings.
Add "GB 18030" to the automatic detection value after uft8;
Add "GB 18030" to the menu display value.
Now, your gedit should be able to open the text file encoded by GB 18030 smoothly.
Gedit version command settings:
Code example:
G settings set org. gnome.gedit.preferences.encodings automatically detected "['UTF-8',' GB 18030',' GB23 12',' GBK',' BIG5',' current',' utf-/.
Gedit text editor attached to Fedora 16 belongs to Gedit version 3. X, so many settings about Gedit on the Internet are not applicable. I can't find them at all.
/apps/gedit-2/preferences/encodings, so users who haven't solved this problem can learn from the version setting method of gedit3.x