Python Interface to NKF
Project description
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:
"BINARY"
"ASCII"
"Shift_JIS"
"CP932"
"EUC-JP"
"EUCJP-MS"
"CP51932"
"ISO-2022-JP"
"CP50221"
"CP50220"
"UTF-8"
## For example
import nkf
input_code = nkf.guess('some string')
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:
"BINARY"
"ASCII"
"Shift_JIS"
"CP932"
"EUC-JP"
"EUCJP-MS"
"CP51932"
"ISO-2022-JP"
"CP50221"
"CP50220"
"UTF-8"
## For example
import nkf
input_code = nkf.guess('some string')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nkf-0.1.1.tar.bz2
(167.7 kB
view hashes)