Unicode To CP932 Transcoder
Project description
UCP9 - Unicode To CP932 Transcoder
A small python package which helps transcode cp932-incompatible kanji characters to their cp932-compatible equivalents
This module provides a transcoding service:
- FROM: An arbitrary unicode character.
- TO: A cp932-compatible, semantically similar but differently encoded version of the same character.
Usage:
import ucp9
ucp9.convert(string, option)
[string]: a string that contains cp932-incompatible characters
[option]: Option to handle cp932-inconvertible characters.
- "keep": keep the cp932-inconvertible characters. NOTE: the return string WON'T be cp932-compatible.
- "remove": remove the cp932-inconvertible characters.
- "replace": (Default behaviour) replace the cp932-inconvertible characters with "?"
Currently supported unicode character blocks:
- Kangxi Radicals
- Print Standard Character
- Old type
- CJK Radicals Supplement
- Katakana Phonetic Extensions
- CJK Unified Ideographs
- CJK Compatibility Ideographs
- CJK Compatibility Ideographs Supplements
Note:
- cp932-incompatible: characters which cannot encode to cp932 using string.encode(), but could potentially have equivalent cp932-encodable versions of themselves.
- cp932-inconvertible: characters which cannot encode to cp932, and doesn't have a cp932-encodable version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ucp9-1.0.1.tar.gz
(13.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ucp9-1.0.1-py3-none-any.whl
(13.6 kB
view details)
File details
Details for the file ucp9-1.0.1.tar.gz.
File metadata
- Download URL: ucp9-1.0.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27cfb05f95d913345fcadbea74bf99a42825e56ed16b317dddcc68ca92990f8d
|
|
| MD5 |
4b20c509c63d285486bbb1a957ef605e
|
|
| BLAKE2b-256 |
54141820e184fa18bff8174987be8b00b903b7d028946065d32435fef9808a33
|
File details
Details for the file ucp9-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ucp9-1.0.1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbee057969498943dd855cf090e3e45dde1fc220947f4f0bc419b4948a1c91c3
|
|
| MD5 |
8cd12b2150537c20af7ffa12116e84ed
|
|
| BLAKE2b-256 |
2910590ef401f3336cf3a45406df2db9b3cf2fffd8aab013ac1a75f255090c9e
|