Skip to content

Instantly share code, notes, and snippets.

@kmila
Created October 11, 2014 16:05
Show Gist options
  • Save kmila/9ec87677173c51eb1e0e to your computer and use it in GitHub Desktop.
Save kmila/9ec87677173c51eb1e0e to your computer and use it in GitHub Desktop.
normalize.py
def normalize_upper(data):
return ''.join(x for x in normalize('NFKD', (data or '').decode('utf-8')) if x in string.printable).encode('ASCII','ignore')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment