Saturday, September 6, 2008

Linux - howto convert iso-8859-1 charset html files into utf-8 charset files

$ iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm > ./newfile.html

ONLY convert file that really are in old charset to new charset

If you convert a file that was already in the new charset format or that you converted manually before or inserted text components in new charset inbetween old text components - then you may get something worse ... neither UTF-8 and nor ISO-8859-1 ...

hence make sure your OLD file IS in OLD charset before running the tool !!

No comments: