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
Python 2.7+ or 3.5+
Test 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-0.8.4.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file mbstrdecoder-0.8.4.tar.gz
.
File metadata
- Download URL: mbstrdecoder-0.8.4.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a28e73ad38c49ced4e80778e1f1fb491291b92460285e5c271d8925495aa8b5f |
|
MD5 | 97d957323cc31db162a951d5cf9dabf8 |
|
BLAKE2b-256 | 48b56a5c362e66a569b02cf04dbb7f69425d8796a57b8e262dd22166bce749f1 |
File details
Details for the file mbstrdecoder-0.8.4-py2.py3-none-any.whl
.
File metadata
- Download URL: mbstrdecoder-0.8.4-py2.py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 651c5aa74c09eb3d049771471bd4e2c91ed637663b08e037ff9f30315f4680d7 |
|
MD5 | 79a168ef827e9ecd01fd84b959e90311 |
|
BLAKE2b-256 | d1bb06a26dcda7404b4387e72317961f50cbadcd91d5d12eb27b4701313cff6f |