Skip to content

Instantly share code, notes, and snippets.

@amferraz
Created June 5, 2014 19:29
Show Gist options
  • Save amferraz/3fab5551bef0698dcaec to your computer and use it in GitHub Desktop.
Save amferraz/3fab5551bef0698dcaec to your computer and use it in GitHub Desktop.
change all files encoding to UTF-8.
for f in $(find . -not -iwholename '*.git*' -type f -exec file --mime-encoding {} \; | egrep -v "(utf-8|ascii|binary)" | awk "{print $1}" | tr -d ":"); do iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv -v $f.utf8 $f; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment