Skip to main content

Python Interface to NKF (Network Kanji Filter)

How to Install

Install from PyPI:

$ sudo pip install nkf

Install from source tree:

$ make
$ sudo make install

Usage

## flag is same as the flags of nkf itself
import nkf
output = nkf.nkf(flag, input)

## For example, to convert from euc-jp to utf-8
output = nkf.nkf('-Ew', 'some euc-jp string')

## Guess character encoding
input_encoding = nkf.guess('some string')

guess() function guesses an input string encoding and returns one of next strings:

  • BINARY
  • ASCII
  • Shift_JIS
  • CP932
  • EUC-JP
  • EUCJP-MS
  • CP51932
  • ISO-2022-JP
  • CP50221
  • CP50220
  • UTF-8
  • UTF-16
  • UTF-32

Metadata

Release files for nkf 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nkf 1.0.4
File Size Uploaded Provenance Actions
nkf-1.0.4.tar.gz 183.0 kB Without provenance Details for nkf-1.0.4.tar.gz

Release files / nkf-1.0.4.tar.gz

Download URL nkf-1.0.4.tar.gz
Size 183.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7eda1424883d351ae8f28ada4ca6cf423ec47c63745d83d4c0c6b8817192b601
BLAKE2b-256 checksum
How to use checksums
ccf68cfefbc6b443fbfd87fb8e0bfa78e4c339d608f9968a1fca5b15969489b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.12.4 CPython/3.11.8

Security for nkf 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page