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.1.tar.gz
(10.2 kB
view hashes)
Built Distribution
Close
Hashes for mbstrdecoder-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37a7739a365f1bf8aa5ff2de2d66b1a84e96dcb41868cc97c480c20b40c3670b |
|
MD5 | 7900129555e9900cb5a1dc515014a58c |
|
BLAKE2b-256 | 95df34e1e92ea77b1a5a3772d1747639992e087eaacdcdb91ef10da9454c823a |