# Character Encoding Utils
[![Python](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org)
[![PyPI](https://img.shields.io/pypi/v/character-encoding-utils)](https://pypi.org/project/character-encoding-utils/)
Some [character encoding](https://en.wikipedia.org/wiki/Character_encoding) utils.
Now support:
- [GB2312](https://en.wikipedia.org/wiki/GB_2312)
- [Big5](https://en.wikipedia.org/wiki/Big5)
- [Shift-JIS](https://en.wikipedia.org/wiki/Shift_JIS)
- [KS-X-1001](https://en.wikipedia.org/wiki/KS_X_1001)
## Installation
```shell
pip install character-encoding-utils
```
## Usage
### GB2312
```python
from character_encoding_utils import gb2312
bs = gb2312.encode('abc中国')
assert gb2312.decode(bs) == 'abc中国'
```
### Big5
```python
from character_encoding_utils import big5
bs = big5.encode('abc中國')
assert big5.decode(bs) == 'abc中國'
```
### Shift-JIS
```python
from character_encoding_utils import shiftjis
bs = shiftjis.encode('abc日本')
assert shiftjis.decode(bs) == 'abc日本'
```
### KS-X-1001
```python
from character_encoding_utils import ksx1001
bs = ksx1001.encode('abc가쳰')
assert ksx1001.decode(bs) == 'abc가쳰'
```
## License
Under the [MIT license](LICENSE).
Raw data
{
"_id": null,
"home_page": "",
"name": "character-encoding-utils",
"maintainer": "TakWolf",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "big5,encoding,gb2312,ksx1001,shift-jis",
"author": "TakWolf",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/be/b7/cdae814f146fca59119154644cead6724bca832f71870ea1a227f32e749a/character_encoding_utils-0.0.6.tar.gz",
"platform": null,
"description": "# Character Encoding Utils\n\n[![Python](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org)\n[![PyPI](https://img.shields.io/pypi/v/character-encoding-utils)](https://pypi.org/project/character-encoding-utils/)\n\nSome [character encoding](https://en.wikipedia.org/wiki/Character_encoding) utils.\n\nNow support:\n\n- [GB2312](https://en.wikipedia.org/wiki/GB_2312)\n- [Big5](https://en.wikipedia.org/wiki/Big5)\n- [Shift-JIS](https://en.wikipedia.org/wiki/Shift_JIS)\n- [KS-X-1001](https://en.wikipedia.org/wiki/KS_X_1001)\n\n## Installation\n\n```shell\npip install character-encoding-utils\n```\n\n## Usage\n\n### GB2312\n\n```python\nfrom character_encoding_utils import gb2312\n\nbs = gb2312.encode('abc\u4e2d\u56fd')\nassert gb2312.decode(bs) == 'abc\u4e2d\u56fd'\n```\n\n### Big5\n\n```python\nfrom character_encoding_utils import big5\n\nbs = big5.encode('abc\u4e2d\u570b')\nassert big5.decode(bs) == 'abc\u4e2d\u570b'\n```\n\n### Shift-JIS\n\n```python\nfrom character_encoding_utils import shiftjis\n\nbs = shiftjis.encode('abc\u65e5\u672c')\nassert shiftjis.decode(bs) == 'abc\u65e5\u672c'\n```\n\n### KS-X-1001\n\n```python\nfrom character_encoding_utils import ksx1001\n\nbs = ksx1001.encode('abc\uac00\uccf0')\nassert ksx1001.decode(bs) == 'abc\uac00\uccf0'\n```\n\n## License\n\nUnder the [MIT license](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Some character encoding utils.",
"version": "0.0.6",
"project_urls": {
"homepage": "https://github.com/TakWolf/character-encoding-utils",
"issues": "https://github.com/TakWolf/character-encoding-utils/issues",
"source": "https://github.com/TakWolf/character-encoding-utils"
},
"split_keywords": [
"big5",
"encoding",
"gb2312",
"ksx1001",
"shift-jis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e729b2dec6799f223d5588ebc805d677327fd8be65d46d2d8d91ded9eea3b087",
"md5": "a504d65d129be9fb4363785cfe01cdcc",
"sha256": "c531a0ebfdd1d2365b2e547786451a2f1a27c25a27a8f7ac20b655d6979110f4"
},
"downloads": -1,
"filename": "character_encoding_utils-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a504d65d129be9fb4363785cfe01cdcc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8740,
"upload_time": "2023-08-22T17:39:21",
"upload_time_iso_8601": "2023-08-22T17:39:21.417610Z",
"url": "https://files.pythonhosted.org/packages/e7/29/b2dec6799f223d5588ebc805d677327fd8be65d46d2d8d91ded9eea3b087/character_encoding_utils-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "beb7cdae814f146fca59119154644cead6724bca832f71870ea1a227f32e749a",
"md5": "25556a7d6d2fa1f9586aa4b6665ff532",
"sha256": "ba0cd6892a5aff1c65ada57254f4d2abfbb13e0d7590ec9e3e06f5726cd7dee8"
},
"downloads": -1,
"filename": "character_encoding_utils-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "25556a7d6d2fa1f9586aa4b6665ff532",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 9748,
"upload_time": "2023-08-22T17:39:23",
"upload_time_iso_8601": "2023-08-22T17:39:23.058942Z",
"url": "https://files.pythonhosted.org/packages/be/b7/cdae814f146fca59119154644cead6724bca832f71870ea1a227f32e749a/character_encoding_utils-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-22 17:39:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TakWolf",
"github_project": "character-encoding-utils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "character-encoding-utils"
}