我使用urllib2发送post请求,因此部分结果包含 Unicode示例:\u10dc\u10d0\u10d7\u10d8\u10d0
所以我想让我的代码解码这段文字,有什么想法吗
我试过这个text=“\u10dc\u10d0\u10d7\u10d8\u10d0” text.decode('utf-8')但它不起作用
我的代码如下所示:
request = urllib2.Request(url, data=data, headers=request_headers)
request.get_method = lambda: method
connection = opener.open(request)
data = connection.read()
print data
目前没有回答
相关问题 更多 >
编程相关推荐