Files
tldr/pages.zh/common/iconv.md

16 lines
410 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# iconv
> 将文本从一种编码转换为另一种编码。
> 更多信息:<https://manned.org/iconv>。
- 将文件转换为特定编码,并打印到 `stdout`
`iconv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}`
- 将文件转换为当前区域设置的编码,并输出到文件:
`iconv -f {{from_encoding}} {{input_file}} > {{output_file}}`
- 列出支持的编码:
`iconv -l`