【发布时间】:2014-07-31 12:12:19
【问题描述】:
尝试通过 python 2.7 中的(唯一)名称获取 unicode 字符。我在docs 中找到的方法对我不起作用:
>>> import unicodedata
>>> print unicodedata.lookup('PILE OF POO')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: "undefined character name 'PILE OF POO'"
【问题讨论】:
标签: python python-2.7 unicode python-2.x