python 将编码转为汉字

print '\u57fa\u7840\u5316\u5de5\u4e1a'.decode('unicode-escape')

print urllib.unquote("%C0%FA%CA%B7%C9%CF%C4%C7%D0%A9%C5%A3%C8%CB%C3%C7.PDF").decode('gbk').encode('utf-8')

显示:历史上那些牛人们.PDF
posted on 2017-04-17 10:39  shaomine  阅读(861)  评论(0编辑  收藏  举报