Awesome
Character Encoding Utils
Some character encoding utils.
Now support:
Installation
pip install character-encoding-utils
Usage
GB2312
from character_encoding_utils import gb2312
bs = gb2312.encode('abc中国')
assert gb2312.decode(bs) == 'abc中国'
Big5
from character_encoding_utils import big5
bs = big5.encode('abc中國')
assert big5.decode(bs) == 'abc中國'
Shift-JIS
from character_encoding_utils import shiftjis
bs = shiftjis.encode('abc日本')
assert shiftjis.decode(bs) == 'abc日本'
KS-X-1001
from character_encoding_utils import ksx1001
bs = ksx1001.encode('abc가쳰')
assert ksx1001.decode(bs) == 'abc가쳰'
License
Under the MIT license.