1. Ubuntu Installation Method: sudoapt-getinstallenca2. command usage Introduction: 1) return the encoding of the file: enca-Lzh_CN file name returns information such as: Universaltransformationformat8bits; UTF-8Mixedlineterminators or a single sentence Universaltransformationformat8bi
1. Ubuntu installation method:
Sudo apt-get install enca
2. command usage:
1) encoding of the returned file:
Enca-L zh_CN file name
The following information is returned:
Universal transformation format 8 bits; UTF-8
Mixed line terminators
Or a single sentence
Universal transformation format 8 bits; UTF-8
2) convert the character encoding of all files in the current directory to UTF-8 encoding:
Enca-L zh_CN-x UTF-8 *
3) If you do not want to overwrite the original file, you can do this:
Enca-L zh_CN-x UTF-8 original file target file
Note: The UTF-8 is the target encoding,-L represents the language environment,
If some files cannot be converted during the conversion process, enca will list them for you.