Skip to content

Instantly share code, notes, and snippets.

@zhaochunqi
Created December 11, 2017 08:16
Show Gist options
  • Save zhaochunqi/890b89f9c14613a82eb7342f895b6501 to your computer and use it in GitHub Desktop.
Save zhaochunqi/890b89f9c14613a82eb7342f895b6501 to your computer and use it in GitHub Desktop.
files=`find . -name '*.java' | xargs enca -L zh | grep GB2312 | cut -d: -f1`
for f in $files; do
iconv -f GBK -t UTF-8 $f > $f.utf && mv -f $f.utf $f && echo "$f done"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment