Skip to main content

Some character encoding utils.

Project description

Character Encoding Utils

Python PyPI

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.

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

character_encoding_utils-0.0.7.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

character_encoding_utils-0.0.7-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page