iconv(1) - Linux 手册页
名称
iconv - 将给定文件的编码从一种编码转换为另一种编码
概要
iconv -f 编码 -t 编码 输入文件
描述
iconv 程序将 输入文件 中字符的编码从一种字符编码集转换为另一种字符编码集。结果会写入标准输出,除非通过 --output 选项另有指定。
--from-code, -f 编码
从 编码 转换字符
--to-code, -t 编码
转换为 编码
--list
列出已知的字符编码集
--output, -o 文件
指定输出文件(代替标准输出)
--verbose
打印进度信息。
示例
以下示例将 "input.txt" 从 ISO88592 编码集转换为 UTF8 编码集或 ASCII 编码集,并将结果存储为 "output.txt"。
iconv -f ISO88592 -t UTF8 < input.txt > output.txt
iconv -f ISO88592 -t ASCII//TRANSLIT < input.txt > output.txt
作者
iconv 由 Ulrich Drepper 编写,作为 GNU C 库的一部分。
此手册页由 Joel Klecker <espy@debian.org> 为 Debian GNU/Linux 系统编写。