Skip to main content

A module for decomposing strings in the latin alphabet to the ascii subset.

Project description

Decompose

This module provides a method for decomposing strings containing latin diacretics, ligatures, and other unusual latin letters into their appropriate ascii counterparts generally for the purpose of data for submission into systems requiring the usage of the ascii subset.

Example

from decompose import decompose

decompose('Málaga') # returns 'Malaga'

Comments

decompose.decompose() depends upon unicodedata.normalize() for most of its heavy lifting. However, it also contains a lookup table (decompose.charmap) for those unicode characters that are not necessarily handled by normalize(). Any letter not handled by either normalize or charmap will be silently dropped.

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

decompose-mrobison-0.0.2.tar.gz (1.9 kB view hashes)

Uploaded Source

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