Chinese garbled problem in gedit of Ubuntu-11.10

Source: Internet
Author: User

By default, garbled characters are displayed 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 the matching list.
1. Command Line
Starting from ubuntu11.10, the default gsettings (based on command line) is used as the System Configuration tool. To solve text garbled characters in gedit, you only need to execute the following command on the terminal:
Gsettings set Org. gnome. gedit. preferences. encodings auto-detected "['utf-8', 'gb18030', 'gb2312', 'gbk', 'big5', 'current', 'utf-16']"
2. Image Methods
Enter
Sudo apt-Get install dconf-tools -- install dconf-Editor
Press Alt-F2, open the run application dialog box, enter dconf-Editor + press enter, open dconf-Editor
Go to org ---> gnome ---> gedit ---> preferences ---> encodings ---> auto-Detected
Add at the beginning
'Gb18030', 'gb2312', 'gbk'. after entering the value, press enter to save the entered content.
The result is ['utf-8', 'gb18030', 'gb2312', 'gbk', 'big5', 'current', 'utf-16'].

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.