Skip to content

Instantly share code, notes, and snippets.

@VerosK
Created April 16, 2015 19:49
Show Gist options
  • Save VerosK/6a2af52348ce3ccf60b0 to your computer and use it in GitHub Desktop.
Save VerosK/6a2af52348ce3ccf60b0 to your computer and use it in GitHub Desktop.
Strip diacritics from UNICODE string
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