How to enable garbled txt files in CentOS
In CentOS, garbled characters are displayed when the edited Chinese characters are displayed in Windows because the encoding used by the two operating systems is different. In Linux, UTF-8 is used, while in Windows, gb18030 is used. Therefore, there are two methods for Linux to enable Chinese garbled characters in txt files.
Method 1:
In the attachment terminal, enter the directory where the txt file is located, use the command "iconv-f gb18030-t utf8 1.txt-o 2.txtcharacter to convert the 1.txtof gb180301_to utf82.txt. This 2.txt is a Linux-supported encoding.
Method 2:
In the attachment terminal, use the command "gconf-editor" to enter the environment configuration, expand "/apps/gedit-2/preferences/encodings /", edit "auto_detected" on the right to add "gb18030" to the top. Later, the text editor will be able to display Chinese characters normally.