Created
February 10, 2016 15:26
-
-
Save eduardoschmidtsantos/64285a52e4c1327aa2f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in `find . -name *.java`; do | |
encoding=$(file -i "$f" | sed "s/.*charset=\(.*\)$/\1/") | |
if [ ! "$encoding" = "utf-8" ]; then | |
echo recoding $f.. from $encoding to 'utf-8' | |
recode $encoding..utf-8 "$f" | |
sed -i -- 's/ISO-8859-1/UTF-8/g' $f | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment