How to convert ISO8859-15 to UTF8?

后端 未结 8 2021
情歌与酒
情歌与酒 2020-12-12 18:04

I have an Arabic file encoded in ISO8859-15. How can I convert it into UTF8?
I used iconv but it doesn\'t work for me.

iconv -f ISO-8859-15          


        
8条回答
  •  萌比男神i
    2020-12-12 18:29

    in my case, the file command tells a wrong encoding, so i tried converting with all the possible encodings, and found out the right one.

    execute this script and check the result file.

    for i in `iconv -l`
    do
       echo $i
       iconv -f $i -t UTF-8 yourfile | grep "hint to tell converted success or not"
    done &>/tmp/converted
    

提交回复
热议问题