(1) how to solve the gedit Chinese garbled problem: by default, when the Ubuntu text editor (Ggedit) opens a Chinese-encoded text file of the GB18030/GBK/GB2312 type, garbled characters will appear. The reason for this is that gedit uses a list of encoding matches, only...
(1) how to solve the Chinese garbled characters in gedit:
By default, garbled characters will appear when the Ubuntu text editor (Ggedit) opens 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. You only need to add GB18030 to this matching list to solve the garbled text problem. The solution is as follows:
1. command line
Gconftool-2 -- set -- type = list -- list-type = string/apps/gedit-2/preferences/encodings/auto_detected "[UTF-8, CURRENT, GB18030, BIG5-HKSCS, BIG5, UTF-16] "" needs to change the encoding order, as needed.
2. graphical mode, applicable to Ubuntu users, not KUbuntu/XUbuntu users
The procedure is as follows:
1) press the Alt-F2 to open the run Application dialog box, type gconf-editor to open the configuration editor ".
2) expand the tree node on the left, find the/apps/gedit-2/preferences/encodings node, and click it; double-click the auto_detected key on the right, and click the Add button on the right of the list, enter "GB18030" and click OK. A "GB18030" is added at the bottom of the list ". Click select it, and click the "up" button on the right until "GB18030" is at the top of the list. "After the change, change the order back as needed ~
(2) vim Chinese garbled problem solution:
Open the vim configuration file at/etc/vim/vimrc and add
Set fileencodings = UTF-8, gb2312, gbk, gb18030
Set termencoding = utf-8 "changed to another one as needed
Set encoding = prc
Save and exit. now vim displays Chinese correctly.
Author mr_yqs