--- id: mbstrdecoder version: "1.1.5" license: MIT License license_treatment: permissive maintenance: active --- # mbstrdecoder — mbstrdecoder is a Python library for multi-byte character string decoder License: permissive · Maintenance: active · Downloads: 7.4M/mo ## 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 above — 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 pip install mbstrdecoder uv add mbstrdecoder 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_current - Install friction: low - Maintenance: active - Downloads: 7.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags multi-byte character decoder, unicode string encoding detection, automatic charset detection, decode encoded bytes to unicode, multi-byte text conversion, character encoding resolver, byte string to unicode, encoding-detection, unicode-conversion [View on SkillFed](https://skillfed.io/packages/mbstrdecoder) · [View on PyPI](https://pypi.org/project/mbstrdecoder/)