From 3295981a722453c95d639e1ef601c1bea513606f Mon Sep 17 00:00:00 2001 From: pr0xy <42575435+pr0xy-t@users.noreply.github.com> Date: Sun, 15 Dec 2019 14:03:00 +0900 Subject: [PATCH] nkf: add page (#2795) --- pages/common/nkf.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/nkf.md diff --git a/pages/common/nkf.md b/pages/common/nkf.md new file mode 100644 index 0000000000..5708d928f9 --- /dev/null +++ b/pages/common/nkf.md @@ -0,0 +1,28 @@ +# 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}}` + +- Set new line code to LF and overwrite (unix type): + +`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}}`