Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from unicodedata import normalize, category
def unaccent(s):
return unicode(
filter(
lambda c: category(c) != 'Mn',
normalize('NFKD', s.decode('utf-8'))
)
).encode('utf-8')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment