Can we change from ASCII to BIG5??
Actually I have to generate a file in BIG5 format from ASCII format and I am not able to find a way to change the encoding of the file. My file created here contains Chinese data which is not displayed in ASCII format and it can only be displayed in BIG5 format.So once I have created an ASCII file I need to convert it to the BIG5. So thats why I need it to convert to BIG5.
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 toBIG5
and write the output tobig5file.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
orcchardet
. If not available in your terminal, you can install it withpip install chardet
(orpip install cchardet
).Once installed pass the the file name as first argument: