2007年4月4日 星期三

 

Ubuntu文件编码转换iconv

中文Windows使用的字符集是GBK
Ubuntu默认字符集是UTF-8
如果想将GBK字符集的文件转换成UTF-8可以使用Ubuntu自带的工具iconv

Usage: iconv [OPTION...] [FILE...]
转换给出文件的编码从一种到另外一种.

输入/输出格式规范
-f, --from-code=NAME 原始文本编码
-t, --to-code=NAME 输出编码

信息
-l, --list 列出所有已知编码字符集

输出控制:
-c 忽略输出中的无效字符
-o, --output=FILE 输出文件
-s, --silent suppress warnings
--verbose 打印进程信息

-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version


例子: SicTE本地语言修改成中文
iconv -f GBK -t utf-8 locale.zh_gb2312.properties -o locale.properties

修改locale.properties文件
translation.encoding=GBK


translation.encoding=UTF-8

把locale.properties复制到/usr/share/scite

标签:


评论: 发表评论



指向此文章的链接:

创建链接



<< 主页

订阅 帖子 [Atom]