Print characters in UTF-32BE, UTF-16LE and UTF-8, and unicode ranges
Project description
print-encoding
A script to print characters to and from unicode.
Usage
print-encoding -h
usage: print-encoding.py [-h] [-l] [-r] [-b BLOCK] [-u UNICODE] [-d DECIMAL] [CHARACTERS ...]
A script to print characters to and from unicode.
positional arguments:
CHARACTERS Print the input CHARACTERS as decimal, UTF-32BE, UTF-8 and UTF-16LE
options:
-h, --help show this help message and exit
-l, --list Print list of Unicode blocks
-r, --redownload Re-downloads the Blocks.txt file with the unicode characters ranges
-b BLOCK, --block BLOCK Print all characters inside a specific Unicode BLOCK
-u UNICODE, --unicode UNICODE Print UNICODE character in decimal, UTF-32BE, UTF-8 and UTF-16LE
-d DECIMAL, --decimal DECIMAL Print DECIMAL character in UTF-32BE, UTF-8 and UTF-16LE
Examples
Print the different encodings of characters € @:
print-encoding € @
Decimal UTF-32BE UTF8 UTF-16LE Char Block Block - char description
──────── ──────── ──────── ──────── ────── ─────── ──────────────────────────
8364 000020ac e282ac ac20 € 075 Currency Symbols - euro sign
64 00000040 40 4000 @ 001 Basic Latin - commercial at
Print all the characters in unicode block number 75:
print-encoding -b 75
Decimal UTF-32BE UTF8 UTF-16LE Char Block Block - char description
──────── ──────── ──────── ──────── ────── ─────── ──────────────────────────
8352 000020a0 e282a0 a020 ₠ 075 Currency Symbols - euro-currency sign
8353 000020a1 e282a1 a120 ₡ 075 Currency Symbols - colon sign
8354 000020a2 e282a2 a220 ₢ 075 Currency Symbols - cruzeiro sign
(...)
75. [0x20a0..0x20cf] Currency Symbols
List all unicode blocks:
print-encoding -l
1. [0x20..0x7f] Basic Latin
2. [0x80..0xff] Latin-1 Supplement
3. [0x100..0x17f] Latin Extended-A
(...)
325. [0xe0100..0xe01ef] Variation Selectors Supplement
326. [0xf0000..0xfffff] Supplementary Private Use Area-A
327. [0x100000..0x10ffff] Supplementary Private Use Area-B
Print character from unicode:
print-encoding -u 1f600
Decimal UTF-32BE UTF8 UTF-16LE Char Block Block - char description
──────── ──────── ──────── ──────── ────── ─────── ──────────────────────────
128512 0001f600 f09f9880 3dd800de 😀 306 Emoticons - grinning face
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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
File details
Details for the file print_encoding-1.2-py3-none-any.whl.
File metadata
- Download URL: print_encoding-1.2-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b0e91636f81cec3f9305f35d67bff96409214c8a2162115ee9ec9188ca0d538
|
|
| MD5 |
f59fa9c5a9118a9e0544d4359a0f0d93
|
|
| BLAKE2b-256 |
f1d55c7bbe5265879edb6d10fb5d11d6f759ac2d72a5456ec63f3b1a9dc3efd0
|