Skip to content

Instantly share code, notes, and snippets.

@caiofrota
Last active November 24, 2017 19:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caiofrota/9f6260124cd7d59ab8f5edf0df251721 to your computer and use it in GitHub Desktop.
Save caiofrota/9f6260124cd7d59ab8f5edf0df251721 to your computer and use it in GitHub Desktop.
Converting encoding with iconv command.
#!/bin/bash
for file in `find . -regextype posix-egrep -regex ".*\.(html|jsp|jspx|java|properties|xml|sql|pck|fnc|trg)"`; do
iconv -f ISO-8859-1 -t UTF-8 $file > $file.utf-8;
mv $file.utf-8 $file;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment