1 =====================================
2 Python Interface to NKF (2009.07.08)
3 =====================================
4 Required: Python3.1+, nkf-2.0.9+
8 1) Download latest nkf-2.0.9+ from https://osdn.jp/projects/nkf/
10 2) $ tar zxvf nkf-2.x.x.tar.gz
14 4) $ tar zxvf NKF_python.tgz
18 6) # python setup.py install
22 ## flag is same as the flags of nkf itself
23 ## The type of input/output is bytes
24 ## The type of flag is str or bytes
26 output = nkf.nkf(flag, input)
28 ## For example, to convert from euc-jp to utf-8
29 output = nkf.nkf('-Ew', b'some euc-jp bytes')
32 which guesses input_string_code and returns one of next strings:
46 ## The type of return value is str
48 input_code = nkf.guess(b'some bytes')
50 Matsumoto, Tadashi ma2@city.plala.jp