-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
返回的格式为
{u'errorcode': 0, u'errormsg': u'OK', u'faces': [], u'tags': [{u'tag_name': u'\xe5\xa4\xb4\xe5\x8f\x91',u'tag_confidence': 13}, {u'tag_name': u'\xe5\xa5\xb3\xe5\xad\xa9', u'tag_confidence': 34}, {u'tag_name': u'\xe6\xb5\xb7\xe6\x8a\xa5', u'tag_confidence': 13}, {u'tag_name': u'\xe7\x94\xb7\xe5\xad\xa9', u'tag_confidence': 23}]}
其中的中文部分u'\xe5\xa4\xb4\xe5\x8f\x91'
不是正常的编码形式,无法通过encode、decode来转换为中文,需要借助.encode('raw_unicode_escape').decode('utf8')
才能正常打印。
参考:7.8. codecs — Codec registry and base classes
希望能够及时改善。祝工作顺利。
weldon2010, matteoshen and incipient1canteen-mannortheastsquare, weldon2010 and canteen-mancanteen-man
Metadata
Metadata
Assignees
Labels
No labels