Advanced ASCII Character Conversion

How to convert extended ASCII characters such as : "æ, ö or ç" to unextended ASCII characters (a, o, c) using python? The way it works should be that if "A, Æ, Ä" is required for input, it returns A for all of them.

+4
source share
1 answer

Unidecode may come in handy.

Python 3.2.3 (default, Jun 8 2012, 05:36:09) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from unidecode import unidecode >>> unidecode("æ, ö or ç") 'ae, o or c' 
+5
source

All Articles