How to convert a text file from Shift JIS to UTF-8 and back from the terminal
To convert from Shift JIS to UTF-8 on linux just do:
iconv -f SHIFT-JIS -t UTF-8 <infile> > <outfile>
and to go the other way just reverse the arguments:
iconv -f UTF-8 -t SHIFT-JIS <infile> > <outfile>
I don't know OSX but it may well have the iconv
command as well, in which case something similar should work.