Method 1: Add encoding support
(1) by default, no editor option is configured in the applications menu of ubuntu,
First, add system-> preferences-> main menu-> system tools, and select the configuration editor.
(2) This is an application.ProgramThe configuration editor is available in the menu.
Apps -- gedit-2 -- preferences -- encodings.
Double-click "auto_detected" on the right and click "add". Then, enter "gb18030" and click "OK.
And up to the first item.
Method 2 compile scripts
1 #! /Bin/bash
2 3 The script is used to change a DOS text file
4 to a Unix File
5 help
6
7 e_badargs = 65
8 if [-z "$1"]; then
9 echo "Usage: 'basename $0 'must have one or two arguments"
10 Exit $ e_badargs
11 fi
12
13 if [-z "$2"]; then
14 newfilename = $1. UNIX
15 else
16 newfilename = $2
17 fi
18
19 iconv-f gbk-T UTF-8 $1> $ newfilename # GBK, gb2312, gb18030 Character Set
20
21 echo "Convert complete! "
22 exit 0
~