.. contents:: **mbstrdecoder**
:backlinks: top
:local:
Summary
=======
`mbstrdecoder <https://github.com/thombashi/mbstrdecoder>`__ is a Python library for multi-byte character string decoder.
.. image:: https://badge.fury.io/py/mbstrdecoder.svg
:target: https://badge.fury.io/py/mbstrdecoder
:alt: PyPI package version
.. image:: https://img.shields.io/pypi/pyversions/mbstrdecoder.svg
:target: https://pypi.org/project/mbstrdecoder
:alt: Supported Python versions
.. image:: https://img.shields.io/pypi/implementation/mbstrdecoder.svg
:target: https://pypi.org/project/mbstrdecoder
:alt: Supported Python implementations
.. image:: https://github.com/thombashi/mbstrdecoder/actions/workflows/lint_and_test.yml/badge.svg
:target: https://github.com/thombashi/mbstrdecoder/actions/workflows/lint_and_test.yml
:alt: CI status of Linux/macOS/Windows
.. image:: https://coveralls.io/repos/github/thombashi/mbstrdecoder/badge.svg?branch=master
:target: https://coveralls.io/github/thombashi/mbstrdecoder?branch=master
:alt: Test coverage
.. image:: https://github.com/thombashi/mbstrdecoder/actions/workflows/codeql-analysis.yml/badge.svg
:target: https://github.com/thombashi/mbstrdecoder/actions/workflows/codeql-analysis.yml
:alt: 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:
.. code:: python
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
============
- Python 3.7+
- `Python package dependencies (automatically installed) <https://github.com/thombashi/mbstrdecoder/network/dependencies>`__
Raw data
{
"_id": null,
"home_page": "https://github.com/thombashi/mbstrdecoder",
"name": "mbstrdecoder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "multi-byte character,unicode,decoder",
"author": "Tsuyoshi Hombashi",
"author_email": "tsuyoshi.hombashi@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/70/8f/dd5d4efbe3f90d2d38c948f0ca5c698e2d6cedc58ead2f5b90272cbcb4fa/mbstrdecoder-1.1.3.tar.gz",
"platform": null,
"description": ".. contents:: **mbstrdecoder**\n :backlinks: top\n :local:\n\n\nSummary\n=======\n`mbstrdecoder <https://github.com/thombashi/mbstrdecoder>`__ is a Python library for multi-byte character string decoder.\n\n\n.. image:: https://badge.fury.io/py/mbstrdecoder.svg\n :target: https://badge.fury.io/py/mbstrdecoder\n :alt: PyPI package version\n\n.. image:: https://img.shields.io/pypi/pyversions/mbstrdecoder.svg\n :target: https://pypi.org/project/mbstrdecoder\n :alt: Supported Python versions\n\n.. image:: https://img.shields.io/pypi/implementation/mbstrdecoder.svg\n :target: https://pypi.org/project/mbstrdecoder\n :alt: Supported Python implementations\n\n.. image:: https://github.com/thombashi/mbstrdecoder/actions/workflows/lint_and_test.yml/badge.svg\n :target: https://github.com/thombashi/mbstrdecoder/actions/workflows/lint_and_test.yml\n :alt: CI status of Linux/macOS/Windows\n\n.. image:: https://coveralls.io/repos/github/thombashi/mbstrdecoder/badge.svg?branch=master\n :target: https://coveralls.io/github/thombashi/mbstrdecoder?branch=master\n :alt: Test coverage\n\n.. image:: https://github.com/thombashi/mbstrdecoder/actions/workflows/codeql-analysis.yml/badge.svg\n :target: https://github.com/thombashi/mbstrdecoder/actions/workflows/codeql-analysis.yml\n :alt: CodeQL\n\n\nInstallation\n============\n\nInstall from PyPI\n------------------------------\n::\n\n pip install mbstrdecoder\n\nInstall from PPA (for Ubuntu)\n------------------------------\n::\n\n sudo add-apt-repository ppa:thombashi/ppa\n sudo apt update\n sudo apt install python3-mbstrdecoder\n\n\nUsage\n=====\n\n:Sample Code:\n .. code:: python\n\n from mbstrdecoder import MultiByteStrDecoder\n\n encoded_multibyte_text = \"\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\".encode(\"utf-8\")\n decoder = MultiByteStrDecoder(encoded_multibyte_text)\n\n print(\"encoded bytes: {}\".format(encoded_multibyte_text))\n print(\"unicode: {}\".format(decoder.unicode_str))\n print(\"codec: {}\".format(decoder.codec))\n\n:Output:\n ::\n\n 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'\n unicode: \u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\n codec: utf_8\n\n\nDependencies\n============\n- Python 3.7+\n- `Python package dependencies (automatically installed) <https://github.com/thombashi/mbstrdecoder/network/dependencies>`__\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "mbstrdecoder is a Python library for multi-byte character string decoder",
"version": "1.1.3",
"project_urls": {
"Homepage": "https://github.com/thombashi/mbstrdecoder",
"Source": "https://github.com/thombashi/mbstrdecoder",
"Tracker": "https://github.com/thombashi/mbstrdecoder/issues"
},
"split_keywords": [
"multi-byte character",
"unicode",
"decoder"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c20f726229136022b154895138bb10ba35e8435c4143f614cb5ad4d4e3fc21ec",
"md5": "c4e47970a045276fc5dc0ac5182ae5d5",
"sha256": "d66c1ed3f2dc4e7c5d87cd44a75be10bc5af4250f95b38bbaedd7851308ce938"
},
"downloads": -1,
"filename": "mbstrdecoder-1.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c4e47970a045276fc5dc0ac5182ae5d5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7761,
"upload_time": "2023-06-10T08:54:19",
"upload_time_iso_8601": "2023-06-10T08:54:19.885978Z",
"url": "https://files.pythonhosted.org/packages/c2/0f/726229136022b154895138bb10ba35e8435c4143f614cb5ad4d4e3fc21ec/mbstrdecoder-1.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "708fdd5d4efbe3f90d2d38c948f0ca5c698e2d6cedc58ead2f5b90272cbcb4fa",
"md5": "33522a4bd9217dae46ebd0761e1a1e7c",
"sha256": "dcfd2c759322eb44fe193a9e0b1b86c5b87f3ec5ea8e1bb43b3e9ae423f1e8fe"
},
"downloads": -1,
"filename": "mbstrdecoder-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "33522a4bd9217dae46ebd0761e1a1e7c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 10460,
"upload_time": "2023-06-10T08:54:22",
"upload_time_iso_8601": "2023-06-10T08:54:22.178938Z",
"url": "https://files.pythonhosted.org/packages/70/8f/dd5d4efbe3f90d2d38c948f0ca5c698e2d6cedc58ead2f5b90272cbcb4fa/mbstrdecoder-1.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-10 08:54:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thombashi",
"github_project": "mbstrdecoder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "mbstrdecoder"
}