2019-12-15 05:03:00 +00:00
|
|
|
# nkf
|
|
|
|
|
|
|
|
> Network kanji filter.
|
|
|
|
> Converts kanji code from one encoding to another.
|
|
|
|
|
|
|
|
- Convert to UTF-8 encoding:
|
|
|
|
|
|
|
|
`nkf -w {{path/to/file.txt}}`
|
|
|
|
|
|
|
|
- Convert to SHIFT_JIS encoding:
|
|
|
|
|
|
|
|
`nkf -s {{path/to/file.txt}}`
|
|
|
|
|
|
|
|
- Convert to UTF-8 encoding and overwrite the file:
|
|
|
|
|
|
|
|
`nkf -w --overwrite {{path/to/file.txt}}`
|
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Set new line code to LF and overwrite (UNIX type):
|
2019-12-15 05:03:00 +00:00
|
|
|
|
|
|
|
`nkf -d --overwrite {{path/to/file.txt}}`
|
|
|
|
|
|
|
|
- Set new line code to CRLF and overwrite (windows type):
|
|
|
|
|
|
|
|
`nkf -c --overwrite {{path/to/file.txt}}`
|
|
|
|
|
|
|
|
- Decrypt mime file and overwrite:
|
|
|
|
|
|
|
|
`nkf -m --overwrite {{path/to/file.txt}}`
|