mbstrdecoder 1.1.4


pip install mbstrdecoder

  Latest version

Released: Jan 18, 2025


Meta
Author: Tsuyoshi Hombashi
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers
  • Information Technology

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Topic
  • Software Development :: Libraries
  • Software Development :: Libraries :: Python Modules
  • Text Processing

Summary

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

PyPI package version https://img.shields.io/pypi/pyversions/mbstrdecoder.svg Supported Python implementations CI status of Linux/macOS/Windows Test coverage CodeQL

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

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
chardet (<6,>=3.0.4)