Unicode normalization filters
Project description
Converts UTF-8 input to the desired UTF-8 in Unicode normalization form.
Read about the Unicode Normalization Forms!
Usage
There are five executables included, that all have the exact same usage and arguments:
unormalize
nfc
nfd
nfkc
nfkd
You may either redirect or pipe input into unormalize (and its buddies), or provide filenames as arguments.
Options
- -f FORM/--form=FORM
Selects the normalization form: one of NFC, NFD, NFKC, or NFKD. The equivalently named executables imply their respective normalization form; unormalize is equivilent to nfk without the --form arugment.
- -i EXTENSION/--in-place EXTENSION
Filenames must be specified as arguments. If so, this opens them, and converts them into the desired normalization form, in place. EXTENSION is the extension given to back-ups of the original files.
Examples
Convert clipboard contents to NFC (macOS):
$ pbpaste | nfc | pbcopy
Convert a file, in-place, to NFKD:
$ nfkd --in-place=.bak file.txt && rm file.txt.bak
Convert circled, variants, and half-widths to their compatible forms:
$ echo 'ℍ①カ' | nfkc H1カ
License
© 2015, 2017 Eddie Antonio Santos. MIT Licensed.
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
Built Distributions
Hashes for unormalize-2020.7.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 808be2b67f60ab1cf7d4763f8562f494924d221a9299a811db6faf514840f39c |
|
MD5 | 15422c1687c46a9dd8d53f4cfca2e2ad |
|
BLAKE2b-256 | 97b373210a64610fcec7c6a9ef179fe5e5569d40229a59c23c1882ffddbc3d54 |
Hashes for unormalize-2020.7.17-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e34a94fa972cabba95d525660dddd36f5511c16417fdae4d8f1b8ba78852f219 |
|
MD5 | 09a3430126149bda849664e0b2a28af6 |
|
BLAKE2b-256 | 3fe16deea8d017699dc9ee77482f585ea4814c0389fb639447fb7cefdbbd694b |