nkf

Network kanji filter. Converts kanji code from one encoding to another. More information: <https://manned.org/nkf>.

Install

All systems
curl cmd.cat/nkf.sh
Debian Debian
apt-get install nkf
Ubuntu
apt-get install nkf
image/svg+xml Kali Linux
apt-get install nkf
CentOS
yum install nkf
Fedora
dnf install nkf
Windows (WSL2)
sudo apt-get update sudo apt-get install nkf
OS X
brew install nkf
Raspbian
apt-get install nkf

Network kanji filter. Converts kanji code from one encoding to another. More information: <https://manned.org/nkf>.

  • 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

© tl;dr; authors and contributors