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
or install all of the optional dependencies:
pip install mbstrdecoder[all]
Install from PPA (for Ubuntu)
sudo add-apt-repository ppa:thombashi/ppa sudo apt update sudo apt install python3-mbstrdecoder
Usage
- Sample Code:
from __future__ import print_function 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.2.tar.gz
(10.7 kB
view details)
Built Distribution
File details
Details for the file mbstrdecoder-0.8.2.tar.gz
.
File metadata
- Download URL: mbstrdecoder-0.8.2.tar.gz
- Upload date:
- Size: 10.7 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 | e33808f0d14c54d889c132da6d99323ebd7f9caecb4727828bf5d48bbaca522e |
|
MD5 | e0ef534cd9e3108ceff45e5052ae602b |
|
BLAKE2b-256 | 53d07c760394b0d0e5e2b7c107e7ccfb9a6a9ca32ce288461cdf1bf674872ca3 |
File details
Details for the file mbstrdecoder-0.8.2-py3-none-any.whl
.
File metadata
- Download URL: mbstrdecoder-0.8.2-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: 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 | 4e440de4bffd735dda1c4b58b2517a52a57672da12ccbbd83fa43c58871f3d86 |
|
MD5 | 87cf1edee4f0e2e316663926a570f8c3 |
|
BLAKE2b-256 | 8a29339819c53cc3889d0eac8e79e87f2ac088f0bb28deccc3cdbfe17b9450d6 |