开发者

Re-encoding entire code base from UTF-16 to UTF-8

Does anyone have a good way 开发者_JAVA百科to re-encode all the *.java file in a directory from UTF-16 to UTF-8?


Run this in your favorite POSIX compatible shell (while you're in the source directory):

find -name "*.java" | while read f; do
   mv "$f" "$f.bak"
   iconv -f utf-16 -t utf-8 < "$f.bak" > "$f"
done
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜