Converting encoding of multiple files with iconv (Mac OS)?
- by Ilya Birman
I need to convert a whole bunch of files from Windows-1251 to UTF-8. After doing 10 of them by hand in BBEdit, I got bored ;-) I found out that there is an iconv CL tool. I tried this:
iconv -f WINDOWS-1251 -t UTF-8 inputfile
However it seems that iconv just outputs the converted text instead of writing it to file. Also, there is no outputfile parameter for it.
How do I write the changes back to original files? Thanks.
Edit: Please note, that inputfile value is actually *.txt, so the solution has to work with that.