unidecode package¶
Module contents¶
Transliterate Unicode text into plain 7-bit ASCII.
Example usage: >>> from unidecode import unidecode: >>> unidecode(u”u5317u4EB0”) “Bei Jing “
The transliteration uses a straightforward map, and doesn’t have alternatives for the same character based on language, position, or anything else.
In Python 3, a standard string object will be returned. If you need bytes, use: >>> unidecode(“Κνωσός”).encode(“ascii”) b’Knosos’