fork download
  1. # http://www.unicode.org/reports/tr29/
  2. import unicodedata
  3. NFC = lambda s: unicodedata.normalize('NFC', s)
  4. NFD = lambda s: unicodedata.normalize('NFD', s)
  5.  
  6. c = u'\u00ea'
  7. print c.encode('utf-8')
  8. print list(NFC(c))
  9. print list(NFD(c))
  10.  
  11.  
Success #stdin #stdout 0.01s 6932KB
stdin
Standard input is empty
stdout
ê
[u'\xea']
[u'e', u'\u0302']