Created
November 3, 2015 01:04
-
-
Save sh1nj1/93b45e3dd95ddb7d15a9 to your computer and use it in GitHub Desktop.
update file encoding
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
find ./ -name "*.sql" -exec file -i {} \; | grep "charset=iso-8859-1" | cut -d':' -f1 | while read a; do iconv -c -f euc-kr -t utf-8 $a > "$a-utf8.sql"; cat "$a-utf8.sql" > "$a"; rm "$a-utf8.sql"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment