I have been given some HTML files that use the Mac OS Roman file encoding. The files have French text, but in an editor many of the diacritical chars look strange (i.e. non
To convert lots of old java code files in directory tree, this worked for me. Observe that the command will change files recursively in all directories from where you did cd into. Make sure you are positioned in the right directory and that you have a backup of your files, and computer, first. When you know what you are doing, correct the rm statement. Hope this can help somebody, took me hours to correct the tiny details to get this working.:
cd /tmp
pwd
find . -name "*.java" -exec bash -c 'mv $1 $1.WXY; iconv -f MAC -t UTF8 $1.WXY > $1; rm $1.WXYY' sh {} \;