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

28 lines
636 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.

# nkf
> 网络汉字过滤器:将汉字编码从一种编码转换为另一种编码。
> 更多信息:<https://manned.org/nkf>。
- 转换为 UTF-8 编码:
`nkf -w {{path/to/file.txt}}`
- 转换为 SHIFT_JIS 编码:
`nkf -s {{path/to/file.txt}}`
- 转换为 UTF-8 编码并覆盖文件:
`nkf -w --overwrite {{path/to/file.txt}}`
- 使用 LF 作为新行代码并覆盖UNIX 类型):
`nkf -d --overwrite {{path/to/file.txt}}`
- 使用 CRLF 作为新行代码并覆盖Windows 类型):
`nkf -c --overwrite {{path/to/file.txt}}`
- 解密 MIME 文件并覆盖:
`nkf -m --overwrite {{path/to/file.txt}}`