skillfed

mbstrdecoder

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

mbstrdecoder v1.1.5 7.4M downloads/30d#1,739 on PyPI6
Permissive license MIT License Active released

What it is and what it does

mbstrdecoder is a lightweight Python library that takes multi-byte encoded byte strings and automatically detects their character encoding, then converts them to Unicode strings. It wraps chardet for codec detection and exposes the decoded result and detected codec through a simple object interface. The library is useful when you receive bytes from external sources and need to reliably convert them to text without knowing the encoding in advance.

The package is actively maintained, supports modern Python versions (3.10–3.14), and has no known security vulnerabilities. Its single runtime dependency keeps installation and maintenance overhead minimal. It is marked Production/Stable and sits in the top 5000 PyPI packages by download volume, indicating steady real-world use.

Use it for:

  • Automatically decode text files or network data when the source encoding is unknown or mixed.
  • Handle user-uploaded files with varied character encodings in web applications.
  • Process log files or data streams that may contain multi-byte characters in different encodings.
  • Normalize encoded strings to Unicode before storing in databases or APIs.
  • Detect and report the codec of incoming byte data for debugging or logging purposes.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Decodes multi-byte character strings by detecting their encoding and converting them to Unicode, using chardet for automatic codec detection.

Yes. The package is lightweight, actively maintained, has no security issues, and solves a real problem—automatic multi-byte string decoding—with minimal dependencies. Install it if you need to reliably convert encoded bytes to Unicode without knowing the source encoding in advance.

Install

mbstrdecoder on PyPI

pip

pip install mbstrdecoder

uv

uv add mbstrdecoder

poetry

poetry add mbstrdecoder

Installing mbstrdecoder

Before you install

Low install friction with a single dependency (chardet). Actively maintained with recent commits and marked as Production/Stable. Supports modern Python versions from 3.10 onward.

License in practice

MIT License permits commercial and private use with minimal restrictions—suitable for most projects without licensing concerns.

Quickstart

pip install mbstrdecoder

from mbstrdecoder import MultiByteStrDecoder

encoded = "マルチバイト文字".encode("utf-8")
decoder = MultiByteStrDecoder(encoded)
print(decoder.unicode_str)  # マルチバイト文字
print(decoder.codec)  # utf_8

Requires Python 3.10 or later.

Verify before relying

  • Whether chardet's detection accuracy meets your use case (e.g., for ambiguous or mixed encodings).
  • Performance characteristics when processing large volumes of encoded text.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — chardet
Maintenance actively maintained — 101 days since the last release
Last repo commit
First released
Downloads 7,436,273/month — #1,739 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mbstrdecoder-1.1.5-py3-none-any.whl

Keywords: multi-byte character, unicode, decoder

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing

Tags

multi-byte character decoderunicode string encoding detectionautomatic charset detectiondecode encoded bytes to unicodemulti-byte text conversioncharacter encoding resolverbyte string to unicode
encoding-detectionunicode-conversion

More Libraries packages