- Mac OS X comes with iconv utility that can convert text between encodings. Run the following command in Terminal to convert a gb2312 chinese text file to utf-8:
iconv -f cp936 -t utf-8 chinese-gb2312.txt > chinese-utf8.txt
-
To list the encodings that iconv supports:
iconv -l
No comments:
Post a Comment