Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TakWolf/character-encoding-utils

Open more actions menu

Repository files navigation

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

MIT License

Morty Proxy This is a proxified and sanitized view of the page, visit original site.