Converting a document to UTF8
Posted Dec 27th, 2014
These days, if your documents aren't encoded using unicode, you're basically asking for trouble. Fortunately, converting a non-unicode document to UTF8 is pretty straightforward using the iconv utility, as demonstrated here.
iconv -f [original encoding] -t UTF-8 [file]
Thus, if you had a file encoded using ISO-8859-1 (aka Latin-1), the following would convert it to UTF-8:
iconv -f ISO-8859-1 -t UTF-8 file.txt > file.utf8.txt