Board logo

标题: [文本处理] LibIconv for Windows:转换字符编码 [打印本页]

作者: tmplinshi    时间: 2011-1-21 22:17     标题: LibIconv for Windows:转换字符编码

官网:http://gnuwin32.sourceforge.net/packages/libiconv.htm
iconv 1.9.2 下载:
http://pan.baidu.com/share/link?shareid=3925773455&uk=1124163200

LibIconv converts from one character encoding to another through Unicode conversion (see Web page for full list of supported encodings). It has also limited support for transliteration, i.e. when a character cannot be represented in the target character set, it is approximated through one or several similar looking characters. It is useful if your application needs to support multiple character encodings, but that support lacks from your system.


用这个工具转换为 UTF-8 时不会添加 BOM。

用法:
  1. iconv [-c] [-s] [-f encoding] [-t encoding] [inputfile ...]
  2. iconv -l
复制代码
例:
  1. echo 测试|iconv -t utf-8
复制代码
  1. echo 娴嬭瘯|iconv -f utf-8 -t gb18030
复制代码
  1. iconv -t utf-8 a.txt > a_utf-8.txt
复制代码
  1. iconv -t utf-8 *.txt
复制代码
iconv 1.11
http://bbs.bathome.net/thread-19842-1-1.html#pid119516

iconv 1.14
http://bbs.bathome.net/thread-21133-1-1.html
http://bcn.bathome.net/s/tool/index.html?key=iconv
作者: tmplinshi    时间: 2011-1-22 18:22

本帖最后由 tmplinshi 于 2011-4-9 06:52 编辑

发现 ConCmd.exe 也可以转换成没有 BOM,需要修改 ConCmd.ini:
AddBOMtoUTF8        当输出是 UTF-8 时指定是否加 BOM (识别码)到档案的前端,0=否,1=是

作者: carson2013    时间: 2013-1-29 16:19

实在太棒了,收了
作者: pubuntu    时间: 2014-8-24 11:06

收下。。。正需要,,




欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2