mbstrdecoder is a Python library for multi-byte character string decoder
Project description
Summary
mbstrdecoder is a Python library for multi-byte character string decoder.
Installation
Install from PyPI
pip install mbstrdecoder
Install from PPA (for Ubuntu)
sudo add-apt-repository ppa:thombashi/ppa sudo apt update sudo apt install python3-mbstrdecoder
Usage
- Sample Code:
from mbstrdecoder import MultiByteStrDecoder encoded_multibyte_text = "マルチバイト文字".encode("utf-8") decoder = MultiByteStrDecoder(encoded_multibyte_text) print("encoded bytes: {}".format(encoded_multibyte_text)) print("unicode: {}".format(decoder.unicode_str)) print("codec: {}".format(decoder.codec))
- Output:
encoded bytes: b'\xe3\x83\x9e\xe3\x83\xab\xe3\x83\x81\xe3\x83\x90\xe3\x82\xa4\xe3\x83\x88\xe6\x96\x87\xe5\xad\x97' unicode: マルチバイト文字 codec: utf_8
Dependencies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mbstrdecoder-1.1.3.tar.gz
(10.5 kB
view details)
Built Distribution
File details
Details for the file mbstrdecoder-1.1.3.tar.gz
.
File metadata
- Download URL: mbstrdecoder-1.1.3.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcfd2c759322eb44fe193a9e0b1b86c5b87f3ec5ea8e1bb43b3e9ae423f1e8fe |
|
MD5 | 33522a4bd9217dae46ebd0761e1a1e7c |
|
BLAKE2b-256 | 708fdd5d4efbe3f90d2d38c948f0ca5c698e2d6cedc58ead2f5b90272cbcb4fa |
File details
Details for the file mbstrdecoder-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: mbstrdecoder-1.1.3-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d66c1ed3f2dc4e7c5d87cd44a75be10bc5af4250f95b38bbaedd7851308ce938 |
|
MD5 | c4e47970a045276fc5dc0ac5182ae5d5 |
|
BLAKE2b-256 | c20f726229136022b154895138bb10ba35e8435c4143f614cb5ad4d4e3fc21ec |