Forrest logo
tool overview
On this page you find all important commands for the CLI tool nkf. If the command you are looking for is missing please ask our AI.

nkf

  1. nkf stands for "New Kanji Filter" and is a command line tool used for character encoding and conversion.
  2. It was developed by Jun-ichiro "itojun" Hagino in 1994 and is widely used in Unix-like operating systems.
  3. nkf supports multiple character encodings including ASCII, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, and more.
  4. It can convert text files from one character encoding to another, making it useful for interoperability among different systems.
  5. The tool can also detect the input encoding of a file and convert it to a desired target encoding.
  6. nkf can be used to normalize Japanese text, convert full-width to half-width characters, apply MIME/Base64 encoding, and remove or add newline characters.
  7. It supports batch processing, allowing users to convert multiple files at once.
  8. The flexibility of nkf makes it valuable for web developers, system administrators, and anyone working with multilingual text.
  9. The command line options of nkf enable users to specify the desired encoding, remove or preserve BOM (Byte Order Mark), and control newline conversion.
  10. nkf is open source and licensed under the Perl Artistic License, which means it is free to use, modify, and distribute.

List of commands for nkf:

  • nkf:tldr:0b82b nkf: Convert to UTF-8 encoding and overwrite the file.
    $ nkf -w --overwrite ${filename-txt}
    try on your machine
    explain this command
  • nkf:tldr:37519 nkf: Convert to SHIFT_JIS encoding.
    $ nkf -s ${filename-txt}
    try on your machine
    explain this command
  • nkf:tldr:497eb nkf: Set new line code to CRLF and overwrite (windows type).
    $ nkf -c --overwrite ${filename-txt}
    try on your machine
    explain this command
  • nkf:tldr:5af16 nkf: Set new line code to LF and overwrite (UNIX type).
    $ nkf -d --overwrite ${filename-txt}
    try on your machine
    explain this command
  • nkf:tldr:cb2cc nkf: Convert to UTF-8 encoding.
    $ nkf -w ${filename-txt}
    try on your machine
    explain this command
  • nkf:tldr:d3d59 nkf: Decrypt mime file and overwrite.
    $ nkf -m --overwrite ${filename-txt}
    try on your machine
    explain this command
tool overview