Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unormalize-2020.7.17.tar.gz (4.8 kB view details)

Uploaded Source

Built Distributions

unormalize-2020.7.17-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

unormalize-2020.7.17-py2-none-any.whl (4.6 kB view details)

Uploaded Python 2

File details

Details for the file unormalize-2020.7.17.tar.gz.

File metadata

  • Download URL: unormalize-2020.7.17.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.16

File hashes

Hashes for unormalize-2020.7.17.tar.gz
Algorithm Hash digest
SHA256 bcfd7ea96da3b6f62defaedbfdb2a0615a6d6e77bf6edc3c1881255302443229
MD5 488a139732b57a560e3a28c88c4ef460
BLAKE2b-256 badaa3100dfa5b5732b1cfce76cc6bbdad9c90e660ec0967eacb07a985806446

See more details on using hashes here.

File details

Details for the file unormalize-2020.7.17-py3-none-any.whl.

File metadata

  • Download URL: unormalize-2020.7.17-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

File hashes

Hashes for unormalize-2020.7.17-py3-none-any.whl
Algorithm Hash digest
SHA256 808be2b67f60ab1cf7d4763f8562f494924d221a9299a811db6faf514840f39c
MD5 15422c1687c46a9dd8d53f4cfca2e2ad
BLAKE2b-256 97b373210a64610fcec7c6a9ef179fe5e5569d40229a59c23c1882ffddbc3d54

See more details on using hashes here.

File details

Details for the file unormalize-2020.7.17-py2-none-any.whl.

File metadata

  • Download URL: unormalize-2020.7.17-py2-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.16

File hashes

Hashes for unormalize-2020.7.17-py2-none-any.whl
Algorithm Hash digest
SHA256 e34a94fa972cabba95d525660dddd36f5511c16417fdae4d8f1b8ba78852f219
MD5 09a3430126149bda849664e0b2a28af6
BLAKE2b-256 3fe16deea8d017699dc9ee77482f585ea4814c0389fb639447fb7cefdbbd694b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page