Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Python Japanese codecs by NKF

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Python Interface to NKF2

1. How to Install

  Install from PyPI:

    $ sudo pip install nkf

  Install from source tree:

    $ make
    $ sudo make install

2. 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')

3.  guess() function,
    which guesses input_string_code and returns one of next strings:

    ## For example
    import nkf
    input_code = nkf.guess('some string')

Something went wrong with that request. Please try again.