Skip to main content

multi-byte character string decoder

Project description

Summary

mbstrdecoder is a Python library for multi-byte character string decoder.

PyPI package version https://img.shields.io/pypi/pyversions/mbstrdecoder.svg Linux/macOS CI status https://img.shields.io/appveyor/ci/thombashi/mbstrdecoder/master.svg?label=Windows%20CI Test coverage

Installation

pip install mbstrdecoder

or install all of the optional dependencies:

pip install mbstrdecoder[all]

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mbstrdecoder-0.7.0-py2.py3-none-any.whl (8.2 kB) Copy SHA256 hash SHA256 Wheel py2.py3
mbstrdecoder-0.7.0.tar.gz (9.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page