- Copyright (c) 2012-2014 SATOH Fumiyasu @ OSS Technology Copr., Japan
- Copyright (c) 2005 Matsumoto, Tadashi (original author)
- License: BSD
- Development home: https://github.com/fumiyas/python-nkf
- Author's home: https://fumiyas.github.io/
Install from PyPI:
$ sudo pip install nkfInstall from source tree:
$ make
$ sudo make install## 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:
BINARYASCIIShift_JISCP932EUC-JPEUCJP-MSCP51932ISO-2022-JPCP50221CP50220UTF-8UTF-16UTF-32