Gedit is the default editor in Ubuntu, which is a bit similar to the Notepad program we often use and widely used. However, this little guy seems to be a bit reluctant to accept, especially when it comes to Chinese, there are various problems. The most common issue is Chinese Garbled text. To be accurate, the TXT file created by other systems may contain Garbled text. Of course, Ubuntu mentioned garbled, there are eight problems is the encoding method, linux by default is the use of UTF-8. The general solution is: GBK, GB23
Gedit is the default editor in Ubuntu, which is a bit similar to the Notepad program we often use and widely used. However, this little guy seems to be a bit reluctant to accept, especially when it comes to Chinese, there are various problems.
The most common issue is Chinese Garbled text. To be accurate, the TXT file created by other systems may contain Garbled text. Of course, Ubuntu mentioned garbled, there are eight problems is the encoding method, linux by default is the use of UTF-8.
The general solution is: GBK, GB2312, and other character encoding. Enter gconf-edit on the terminal to call up gconf-edit. In apps-> gedit-2-> preferences-> encodings, double-click auto-detected on the right to bring up a dialog box, add the GBK, GB2312, and GB18030 codes to it and set the codes to the top.
Now, open the TXT file. However, if you create an empty file in Ubuntu and double-click it to open it, you will find that gedit does not respond after flashing. When you use the command to open it, an error message is displayed. At this time, repeat the above operation, or put the UTF-8 to the top, this problem is solved, and open other TXT documents will not appear garbled.
Sometimes, you need to edit some key configuration documents of the system and the root permission is required. Sudo gedit ...... After such a command, the garbled characters that have been removed have appeared again. To solve this problem, you need to use sudo gconf-edit and add GB2312 and other encodings. Of course, you still do not need to pin it to the top.
These are some interesting questions about gedit.