nkf

github.com ↗

Convert Japanese text encodings and kana forms

SI Score
80/100
Pricing
Not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about nkf

Answers use saved listing facts and recorded sources.

What it does

nkf is a command-line filter for Japanese encodings and Unicode, with input detection, kana conversion and line-folding options.

Choose the target encoding explicitly when converting older Japanese text with nkf, and use its encoding guess as a clue rather than a guarantee. Conversion also affects character forms: the default changes halfwidth kana to fullwidth forms, while -x preserves the documented kana forms. BOM, byte order and line endings have separate controls. Unassigned characters are skipped by default unless a fallback is selected. Both --in-place and --overwrite replace original listed files; the latter preserves timestamps. Review those choices before using either mode.

Strengths

  • Japanese encoding detection and conversion
  • Kana and fullwidth-character controls

Watch out for

  • Default kana conversion can alter character forms

Best for

  • Preparing older Japanese text for Unicode use

Sources