def normalizeUnicode(value):
 return (unicodedata.normalize('NFKD', value).encode('ascii', 'ignore') if isinstance(value, unicode) else value)

def normalizeUnicode ( value ) : return ( unicodedata . normalize ( 'NFKD' , value ) . encode ( 'ascii' , 'ignore' ) if isinstance ( value , unicode ) else value )
does an ascii normalization of unicode strings reference: URL .