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+ or PyPy
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.3.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file mbstrdecoder-0.8.3.tar.gz
.
File metadata
- Download URL: mbstrdecoder-0.8.3.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 | 39a31ea51c07094d7e02d36aaae9b92468f84aaf0b84d42fd1fe96da1d1ec6ca |
|
MD5 | 4de9003b2e9e8cfa0396261c9b26eb2b |
|
BLAKE2b-256 | c6499dc5055b2973c78c01e1a178a11f29799a18adea524787b24e4a93f161a8 |
File details
Details for the file mbstrdecoder-0.8.3-py2.py3-none-any.whl
.
File metadata
- Download URL: mbstrdecoder-0.8.3-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 | 0f8b718e84e3347b99914ddf72f040eea58170524e129b19cf5a05551300b5a0 |
|
MD5 | b775f86069e28d74ffb6af5c59def915 |
|
BLAKE2b-256 | 431f7d3f8195f75b65e5591df50dbb6c2c65ae6145a04b5bd955bd4f071255a6 |