Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of garbled code in ubuntu text editor gedit

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "ubuntu text editor gedit Chinese garbled problem how to solve", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "ubuntu text editor gedit Chinese garbled problem how to solve" it!

By default, garbled code will occur when you use Ubuntu's text editor gedit to open Chinese-encoded text files such as GB18030/GBK/GB2312.

The reason for this is that gedit uses a list of encoding matches, only codes in this list will match, and codes that are not in this list will be displayed as garbled. All you have to do is add GB18030 to the matching list.

Command line mode, applicable to all Ubuntu users.

Copy the following command to the terminal, and then enter:

The code is as follows:

Gconftool-2-set-type=list-list-type=string / apps/gedit-2/preferences/encodings/auto_detected "[UTF-8,CURRENT,GB18030,BIG5-HKSCS,UTF-16]"

Graphical method, suitable for Ubuntu users, but not for KUbuntu/XUbuntu users.

You can follow these steps to make your gedit display Chinese encoded files correctly.

Press Alt-F2 to open the run Application dialog box.

Type "gconf-editor" in the text box and 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 GB18030, and click the OK button.

A new "GB18030" is added to the bottom of the list. Click to select it, and click the up button on the right until "GB18030" is at the top of the list.

Click the OK button to close the configuration editor.

Your gedit should now be able to open the GB18030-encoded text file smoothly.

Thank you for your reading, the above is the "ubuntu text editor gedit Chinese garbled problem how to solve" the content, after the study of this article, I believe you on the ubuntu text editor gedit Chinese garbled problem how to solve this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report