accented chars remover


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import unicodedata
  2.  
  3. def removeAccentedChars(s):
  4. return unicodedata.normalize('NFKD',s).encode('ascii','ignore')
  5.  
  6. print removeAccentedChars(u"aaàöÜ")

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.