Python Forum
unicode to ascii for look-like letters - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: unicode to ascii for look-like letters (/thread-24190.html)



unicode to ascii for look-like letters - Skaperen - Feb-03-2020

does anyone know of a module or database to convert Unicode to ASCII of look-like letters? by that i mean any codes above 127 that have an appearance like or similar to a letter or any character in ASCII gets translated to that letter or character in ASCII that it looks like. for example the letter "A" with a variety of different accent marks or different display effects get translated to "A". if it wants input and/or gives results as numeric codes, that's OK.


RE: unicode to ascii for look-like letters - Gribouillis - Feb-03-2020

Try the unidecode module
>>> from unidecode import unidecode
>>> 
>>> unidecode("L'été à la plage")
"L'ete a la plage"



RE: unicode to ascii for look-like letters - Skaperen - Feb-05-2020

that's a misleading name. but thinks for the info.