Created
June 17, 2013 13:18
-
-
Save jlbfalcao/5796791 to your computer and use it in GitHub Desktop.
converting all files from us-ascii to utf-8
This file contains hidden or 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
find path -type f | xargs file --mime-encoding | grep us-ascii | cut -d: -f 1 | while read f; do | |
mv $f{,.ascii} | |
echo $f | |
iconv -f UTF-8 -t US-ASCII $f.ascii > $f | |
rm $f.ascii | |
# git add $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment