# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 nkf

查看 nkf 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:nkf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nkf
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nkf
```

  证据: MacPorts ports tree: textproc/nkf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install nkf
```

  证据: Debian stable package indexes: nkf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install nkf
```

  证据: Fedora Rawhide package metadata: nkf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#nkf
```

  证据: nixpkgs package indexes: pkgs/by-name/nk/nkf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install nkf
```

  证据: openSUSE Tumbleweed package metadata: nkf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:nkf
- **软件包管理器:** Homebrew
- **版本:** 2.1.5
- **来源摘要:** Network Kanji code conversion Filter (NKF)
- **主页:** <https://github.com/nurse/nkf>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- nkf (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.1.5
## 项目历史与用法

nkf, the Network Kanji Filter, is a long-lived Japanese text encoding conversion utility. It converts among encodings such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16, and UTF-32, with automatic input-encoding guessing as one of its defining conveniences.

### 项目历史

The upstream README credits the original 1987 Fujitsu work by Itaru Ichikawa and the nkf Project's later maintenance from 1996 through 2012. The project's change log shows a major 2.0-era transition in September 2002, including UTF-8/UTF-16 work and migration into SourceForge CVS, which matches nkf's role as Japanese Unix text processing moved from legacy encodings toward Unicode.

### 采用历史

nkf has survived because the Japanese encoding problem never fully disappeared: archives, mail, old web content, Windows-31J/CP932 data, and legacy build/test fixtures still need reliable conversion. Homebrew's API reported 144 installs in 30 days, 560 in 90 days, and 4,692 in 365 days when checked on July 1, 2026, and the package is also present across Debian/Ubuntu, Fedora, openSUSE, Nix, MacPorts, and other package systems.

### 使用方式

Typical command-line use is plumbing: guess an unknown Japanese file's encoding, convert Shift_JIS or EUC-JP to UTF-8, normalize line endings, MIME-decode Japanese mail headers, or do in-place conversion with `--overwrite`. Developers also encounter nkf indirectly through language bindings, notably Ruby's NKF extension.

### 时间线

- 1987: original nkf copyright is attributed to Fujitsu Ltd. and Itaru Ichikawa.
- 1996-2012: README credits ongoing nkf Project copyright.
- 2002-09: 2.0-era notes record UTF support work and SourceForge CVS setup.
- 2018-12-15: v2.1.5 is the stable version carried by Homebrew.

### Related projects

- Ruby NKF extension
- python-nkf
- iconv

### 来源

- <https://formulae.brew.sh/api/formula/nkf.json>
- <https://github.com/nurse/nkf>
- <https://raw.githubusercontent.com/nurse/nkf/master/Changes>
- <https://raw.githubusercontent.com/nurse/nkf/master/nkf.1>
- <https://ruby-doc.org/core-3.1.2/NKF.html>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 其他软件包管理器记录

- Debian apt - libnkf-perl - 1:2.1.5-1+b8: normalized package name match | Debian stable package indexes: libnkf-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Network Kanji code conversion Filter for Perl | https://osdn.net/projects/nkf/
- Debian apt - nkf - 1:2.1.5-1+b8: normalized package name match | Debian stable package indexes: nkf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Network Kanji code conversion Filter | https://osdn.net/projects/nkf/
- Nix - nkf: normalized package name match | nixpkgs package indexes: pkgs/by-name/nk/nkf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libnkf-perl - 1:2.1.5-1build7: normalized package name match | Ubuntu 24.04 LTS package indexes: libnkf-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Kanji code conversion Filter for Perl | https://osdn.net/projects/nkf/
- Ubuntu apt - nkf - 1:2.1.5-1build7: normalized package name match | Ubuntu 24.04 LTS package indexes: nkf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Kanji code conversion Filter | https://osdn.net/projects/nkf/
- dnf - nkf - 2.1.4-40.fc45: normalized package name match | Fedora Rawhide package metadata: nkf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A Kanji code conversion filter | http://nkf.osdn.jp/
- dnf - perl-NKF - 2.1.4-40.fc45: normalized package name match | Fedora Rawhide package metadata: perl-NKF from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Perl extension for Network Kanji Filter | http://nkf.osdn.jp/
- zypper - nkf - 2.1.5-1.37: normalized package name match | openSUSE Tumbleweed package metadata: nkf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Network Kanji Code Conversion Filter | http://sourceforge.jp/projects/nkf/
- zypper - perl-NKF - 2.1.5-1.37: normalized package name match | openSUSE Tumbleweed package metadata: perl-NKF from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Perl extension for nkf (Network Kanji Filter) | http://sourceforge.jp/projects/nkf/
- MacPorts - nkf: normalized package name match | MacPorts ports tree: textproc/nkf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/nkf.yml](https://github.com/mxcl/pkgdb/blob/main/combined/nkf.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
