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
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.