# detect your file encoding
file --mime-encoding <your-file>
# convert your file encoding
iconv --from-code cp936 --to-code utf-8 gb2312.java > utf-8.javalist
iconvsupported encodings usingiconv --list, although it may not be very useful.
# detect your file encoding
file --mime-encoding <your-file>
# convert your file encoding
iconv --from-code cp936 --to-code utf-8 gb2312.java > utf-8.javalist
iconvsupported encodings usingiconv --list, although it may not be very useful.
| #! /bin/sh | |
| for file in `find . -name "*.java"`; do | |
| iconv --from-code GB2312 --to-code UTF-8 "$file" > "$file.new" && | |
| mv "$file.new" "$file" | |
| done |