Looking for UNICODE to ASCII Conversioni Example Code
Zero Piraeus
z at etiol.net
Fri Oct 18 18:02:54 EDT 2013
:
On Fri, Oct 18, 2013 at 01:45:53PM -0700, caldwellinva at gmail.com wrote:
> I am looking for an example of a UNICODE to ASCII conversion example
> that will remove diacritics from characters (and leave the characters,
> i.e., Klüft to Kluft) as well as handle the conversion of other
> characters, like große to grosse.
This:
https://pypi.python.org/pypi/Unidecode/
... seems to work:
>>> from unidecode import unidecode
>>> unidecode("Klüft, große")
'Kluft, grosse'
>>> unidecode("Текст декодирует вы")
'Tekst dekodiruet vy'
-[]z.
--
Zero Piraeus: post scriptum
http://etiol.net/pubkey.asc
More information about the Python-list
mailing list