Created
April 16, 2015 19:49
-
-
Save VerosK/6a2af52348ce3ccf60b0 to your computer and use it in GitHub Desktop.
Strip diacritics from UNICODE string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unicodedata | |
unicode_string = u'Šílená kráva' | |
unicodedata.normalize('NFKD', unicode_string).encode('ASCII', 'ignore') | |
# out: 'Silena krava' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment