时间:2009-5-27|作者: sunliguo|评论:No Responses|点击:|
中国人学习计算机,难免在各种字符编码中倒腾。
用firefox浏览某些网页时有乱码,转换编码为gb2312 一般就可以正常浏览了。还有用SSH Secure Shell 上传文件的时候,由于服务器是utf-8编码。到服务器上看是一片乱码,但是用SSH Secure Shell Client看还是中文。
今天无意中在网上发现了一个命令:convmv 。这个可以在各种编码中转换文件名。用法很简单:
convmv -f gb2312 -t utf-8 filename --notest
-f 指定 当前文件名的编码
-t 要转换为的编码
filename 文件名,这时候一般是乱码了。可以使用通配符。
--notest 默认是不做转换。只是显示要做的事。 |
convmv -f gb2312 -t utf-8 filename --notest
-f 指定 当前文件名的编码
-t 要转换为的编码
filename 文件名,这时候一般是乱码了。可以使用通配符。
--notest 默认是不做转换。只是显示要做的事。
还有个是转换文件字符编码的命令:iconv。用法和convmv差不多。
Tags: iconv
This entry was posted
on Wednesday, May 27th, 2009 at 20:51 and is filed under Linux.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.