Today, the txt file opened in Ubuntu11.04 is garbled, so I searched a lot on the Internet and said almost everything: terminal-gconf-editor-& gt; apps-& gt; gedit-2-& gt; preferences-& gt; encodings-& gt; auto_detected-& gt; added gbk, gb18030 top, but still did not solve the garbled problem. This is also true in sudogconf-editor.
Today, I opened the txt file in Ubuntu 11.04 and found it garbled. So I searched a lot on the Internet, all of which are similar:
As follows:
Terminal-gconf-editor-> apps-> gedit-2-> preferences-> encodings-> auto_detected-> Add gbk, gb18030 top, but still does not solve the garbled problem. Sudo gconf-editor does the same, but it does not solve the garbled problem.
The following method is feasible:
Gedit -- encoding gbk mytest.txt
However, it is inconvenient to use the following method:
Gconftool-2 -- set -- type = list -- list-type = string/apps/gedit-2/preferences/encodings/auto_detected "[UTF-8, CURRENT, GB18030, BIG5-HKSCS, UTF-16]"
Feasible.
But now I have doubts, why is the first solution not feasible? Is www.linuxidc.com a problem in the txt format ???
Vim Chinese garbled solution:
Terminal-"vim ~ /. Enter vimrc.
Let & termencoding = & encoding
Set fileencodings = UTF-8, gbk
This is feasible.