Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Overview

Travis-CI AppVeyor Coverage Status PyPI version

ASCII transliterations of Unicode text that recognize CJKV complex charactors

Usage

You can run it on python interpreter:

       from unihandecode import Unihandecoder
       d = Unihandecoder(lang='zh')
       print d.decode("\u660e\u5929\u660e\u5929\u7684\u98ce\u5439")
       # That prints: Ming Tian Ming Tian De Feng Chui

       u = Unihandecoder(lang='ja')
       print d.decode('\u660e\u65e5\u306f\u660e\u65e5\u306e\u98a8\u304c\u5439\u304f')
       # That prints: Ashita ha Ashita no Kaze ga Fuku

There are some other examples in tests/basic_2.py.

Description

It often happens that you have non-Roman text data in Unicode, but you can’t display it – usually because you’re trying to show it to a user via an application that doesn’t support Unicode, or because the fonts you need aren’t accessible. You could represent the Unicode characters as “???????” or “15BA15A01610…”, but that’s nearly useless to the user who actually wants to read what the text says.

What Unihandecode provides is a function, ‘decode(…)’ that takes Unicode data and tries to represent it in ASCII characters (i.e., the universally displayable characters between 0x00 and 0x7F). The representation is almost always an attempt at transliteration – i.e., conveying, in Roman letters, the pronunciation expressed by the text in some other writing system. (See the example above)

These are same meaning in both language in example above. “明天明天的风吹” for Chinese and “明日は明日の風が吹く” for Japanese. The character “明” is converted “Ming” in Chinese. “明日” is converted “Ashita” but single charactor “明” will be converted “Mei” in Japanese.

This is an improved version of Python unidecode, that is Python port of Text::Unidecode Perl module by Sean M. Burke <sburke@cpan.org>.

Requirements

It use a setuptools library to build and test.

Installation

You can install Unihandecode as usual

$ pip install unihandecode

Build

You can build Unihandecode in recent way

$ python -m pep517.build ./

Test

You can run test with tox

$ tox

SUPPORT

Questions, bug reports, useful code bits, and suggestions for Unihandecode are handled on github.com/miurahr/unihandecode

AVAILABILITY

The latest version of Unihandecode is available from Git repository in github.com:

https://github.com/miurahr/unihandecode

and Eggs are on PyPi.python.org:

https://pypi.python.org/pypi/Unihandecode

LICENSE

Unihandecode

Copyright 2010-2018,2020 Hiroshi Miura

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Bitdeli

Metadata

Release files for unihandecode 0.9a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unihandecode 0.9a1
File Size Uploaded
unihandecode-0.9a1.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for unihandecode 0.9a1
File Interpreter ABI Platform
unihandecode-0.9a1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 4.4 MB

Release files / unihandecode-0.9a1.tar.gz

Download URL unihandecode-0.9a1.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
e82f30a30424be2d9dbfdccca9cfd3d30f839c3c112d215940c2110022958668
BLAKE2b-256 checksum
How to use checksums
6f49bfe744ec2b4ff652ca28e63702129ad463404a3b56a47ac2886a9e7a2d34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

Release files / unihandecode-0.9a1-py2.py3-none-any.whl

Download URL unihandecode-0.9a1-py2.py3-none-any.whl
Size 2.6 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
99e84ea3ae16ad7598a0ca6211c90d1eff8c9440ec3940ab06a1febe9fb68e14
BLAKE2b-256 checksum
How to use checksums
d19af8755ddcc2e1677dfb274ad2f967c70e0f431de4f29a6f146dfdb46def38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

Release history Release notifications | RSS feed

0.81

2 release files

0.80

2 release files

0.51

6 release files

0.50

3 release files

0.46

0.45

3 release files

0.44

3 release files

0.43

3 release files

0.42

0.40

5 release files

0.31

1 release file

0.30

1 release file

0.20

0.10

1 release file

This release

0.9a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page