equal
deleted
inserted
replaced
341 ## end of http://code.activestate.com/recipes/576693/ }}} |
341 ## end of http://code.activestate.com/recipes/576693/ }}} |
342 |
342 |
343 def remove_accents(str): |
343 def remove_accents(str): |
344 nkfd_form = unicodedata.normalize('NFKD', unicode(str)) |
344 nkfd_form = unicodedata.normalize('NFKD', unicode(str)) |
345 return u"".join([c for c in nkfd_form if not unicodedata.combining(c)]) |
345 return u"".join([c for c in nkfd_form if not unicodedata.combining(c)]) |
|
346 |
|
347 def normalize(str): |
|
348 return remove_accents(str).lower() |