Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takwolf/character-encoding-utils
Some character encoding utils.
https://github.com/takwolf/character-encoding-utils
big5 character characters encoding encodings gb2312 ksx1001 shift-jis
Last synced: about 2 months ago
JSON representation
Some character encoding utils.
- Host: GitHub
- URL: https://github.com/takwolf/character-encoding-utils
- Owner: TakWolf
- License: mit
- Created: 2023-05-10T06:33:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-28T10:15:20.000Z (2 months ago)
- Last Synced: 2024-10-28T13:38:55.235Z (2 months ago)
- Topics: big5, character, characters, encoding, encodings, gb2312, ksx1001, shift-jis
- Language: Python
- Homepage: https://pypi.org/project/character-encoding-utils/
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 gb2312bs = gb2312.encode('abc中国')
assert gb2312.decode(bs) == 'abc中国'
```### Big5
```python
from character_encoding_utils import big5bs = big5.encode('abc中國')
assert big5.decode(bs) == 'abc中國'
```### Shift-JIS
```python
from character_encoding_utils import shiftjisbs = shiftjis.encode('abc日本')
assert shiftjis.decode(bs) == 'abc日本'
```### KS-X-1001
```python
from character_encoding_utils import ksx1001bs = ksx1001.encode('abc가쳰')
assert ksx1001.decode(bs) == 'abc가쳰'
```## License
Under the [MIT license](LICENSE).