获得中文的unicode编码

来源:互联网 发布:淘宝店铺歌曲 编辑:程序博客网 时间:2024/06/11 23:05

获得一个字符的unicode编码

str.decode('utf-8')

Code Example:

>>> '王'.decode('utf-8')u'\u738b'
原创粉丝点击