Unicode to ASCII transliteration
Project description
AnyAscii
Unicode to ASCII transliteration
Converts Unicode text to a reasonable representation using only ASCII.
For most characters in Unicode, AnyAscii provides an ASCII-only replacement string. Text is converted character-by-character without considering the context. The mappings for each script are based on popular existing romanization schemes. Symbolic characters are converted based on their meaning or appearance. All ASCII characters in the input are left unchanged, every other character is replaced with printable ASCII characters. Unknown characters are removed.
from anyascii import anyascii
s = anyascii('άνθρωποι')
assert s == 'anthropoi'
Python 3.3+ compatible
pip install anyascii
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.