I have no idea how a file in ASCII encoding could contain Chinese data but if it were possible this would be the command:
iconv -f ASCII -t BIG5 asciifile -o big5file.txt
It will convert your file in ASCII
encoding to BIG5
and write the output to big5file.txt
.
But most likely it is not ASCII that you have in the original file. Make sure you detect the exact encoding and then use it in the command. Use iconv -l
to view all available encodings.
You can try to figure out the real encoding with chardet
or cchardet
. If not available in your terminal, you can install it with pip install chardet
(or pip install cchardet
).
Once installed pass the the file name as first argument:
chardet Tian.Jiang.Xiong.Shi.srt
>>> Tian.Jiang.Xiong.Shi.srt: GB2312 with confidence 0.99
If you install with pip3 then the script name will be chardet3 or chardetect3.