How do I reverse Unicode decomposition using Python?

前端 未结 3 1882
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 05:58

Using Python 2.5, I have some text in stored in a unicode object:

Dinis e Isabel, uma difı´cil relac¸a˜o conjugal e polı´tica

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 06:09

    I think you are looking for this:

    >>> import unicodedata    
    >>> print unicodedata.normalize("NFC",u"c\u0327")
    ç
    

提交回复
热议问题