Python library for multi-byte character string decoder.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
examples
mbstrdecoder
requirements
test
.gitignore
.travis.yml
LICENSE
MANIFEST.in
README.rst
appveyor.yml
pylama.ini
pyproject.toml
setup.cfg
setup.py
tox.ini

README.rst

mbstrdecoder

https://img.shields.io/travis/thombashi/mbstrdecoder/master.svg?label=Linux/macOS https://img.shields.io/appveyor/ci/thombashi/mbstrdecoder/master.svg?label=Windows https://coveralls.io/repos/github/thombashi/mbstrdecoder/badge.svg?branch=master

Summary

Python library for multi-byte character string decoder.

Installation

pip install 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_multibyte_text)
print(decoder.unicode_str)
print(decoder.codec)
Output:
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'
マルチバイト文字
utf_8

Dependencies

Python 2.7+ or 3.4+

Test dependencies