⬅︎ Back to Unicode strings to ASCII ...nicely
There's now the "unidecode" package that does all the job http://pypi.python.org/pypi/Unidecode/>>> from unidecode import unidecode>>> utext = u"œuf dür">>> unidecode(utext)u'oeuf dur'>>> from unicodedata import normalize>>> normalize('NFKD', utext).encode('ascii','ignore')'uf dur'A better support for special latin extended characters (French, German) that should tranlitterate to multiple ASCII characters.
Comment
There's now the "unidecode" package that does all the job http://pypi.python.org/pypi/Unidecode/
>>> from unidecode import unidecode
>>> utext = u"œuf dür"
>>> unidecode(utext)
u'oeuf dur'
>>> from unicodedata import normalize
>>> normalize('NFKD', utext).encode('ascii','ignore')
'uf dur'
A better support for special latin extended characters (French, German) that should tranlitterate to multiple ASCII characters.