pero on anything

How to change encoding of a file?

Another chapter of the book “Encoding is hell” ;) Today I noticed that some files in one of our projects suddenly have been converted to UTF-8 where they should have been in ISO-8859-1. Ok, short question: How to convert it back?

Short Answer
Use iconv like this:

iconv --from-code=UTF-8 --to-code=ISO-8859-1 inputfile.txt > outputfile.txt

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">