Convert a text file from UTF-8 to ISO-8859-1

less than 1 minute read

From time to time you stumble upon the problem of character encodings. You get a file in encoding A, but prefer it in encoding B.

If you have a Unix shell at your fingertips (or at least something similar) you can use the iconv tool to do the job for you.

Converting an UTF-8 file to ISO-8859-1 will be as simple as this:

1
    iconv --from-code=UTF-8 --to-code=ISO-8859-1 utf8-encoded.txt > iso-encoded.txt