Method 1:
In Ubuntu, gedit is used to open the. Txt file. The default gedit encoding is UTF8. The gb2312 files edited in windows are garbled. {the default file format in Windows is GBK (gb2312 ), (GBK encoding is a superset of GB2312 encoding and is fully compatible with GB2312 .)}. The solution is to change the default code of gedit to GB2312.
Choose application> System Tools> configuration editor. If not, open system> Preferences> Main Menu> System Tools> configuration editor.
Open/apps/gedit-2/preferences/encodings/double-click auto_detected on the right, and click Add in the pop-up dialog box, add the value GB2312 (change the gedit recognized encoding to the top GB2312 when editing the document in windows), click OK, and add GB18030, GBK, click the "Up" button to move GB18030 to the first (first preferred ). Similarly, set show_in_menu and place GB18030 first.
Then open the. Txt file.
Method 2:
Enable the application select the openoffice text processing program as shown in the figure.
FILE-open the txt file you want to open. When it is opened, a window will pop up asking you what types of characters to select. As shown in the figure, select Simplified Chinese (GB18030). (the GB18030 encoding is backward compatible with GBK and GB2312. The compatibility means not only character compatibility, but also the same character encoding .) It will be displayed normally. You only need to ask each time.
As shown in the following figure: