developer@2015:~$ locale -a 查看本地字符集
developer@2015:~$ locale -m 查看所有支持的字符集

file -i input.txt   查看文件字符集


将文件从gb2312转为utf8
iconv -f gb2312 -t utf8  input.txt -o output.txt

posted on 2015-04-24 11:52  激战  阅读(1109)  评论(0编辑  收藏  举报