What is the fastest, easiest tool or method to convert text files between character sets?
Specifically, I need to convert from UTF-8 to ISO-8859-15 and vice versa.>
If you have vim you can use this:
Not tested for every encoding.
The cool part about this is that you don't have to know the source encoding
vim +"set nobomb | set fenc=utf8 | x" filename.txt
Be aware that this command modify directly the file
+ : Used by vim to directly enter command when opening a file. Usualy used to open a file at a specific line: vim +14 file.txt| : Separator of multiple commands (like ; in bash)set nobomb : no utf-8 BOMset fenc=utf8 : Set new encoding to utf-8 doc linkx : Save and close filefilename.txt : path to the file" : qotes are here because of pipes. (otherwise bash will use them as bash pipe)