0

例如,一个Get请求后,Server返回如下信息:

HTTP/1.1 200 OK 
Date: Mon, 19 Jan 2009 06:37:47 GMT 
Server: IBM_HTTP_Server/6.0.2 Apache/2.0.47 (Unix) 
Content-Disposition: attachment; filename=MPLS TE Switching%E6%96%B9%E6%A1%88%E7%99%BD%E7%9A%AE%E4%B9%A6.pdf 
Content-Length: 1444670 
Content-Type: application/octet-stream 
Content-Language: zh-CN 

MPLS TE Switching%E6%96%B9%E6%A1%88%E7%99%BD%E7%9A%AE%E4%B9%A6.pdf是中文字符串文件名,应该是怎么转换才能正常显示? 我所做的是使用:

filename.decode("iso-8859-1")

但它没有用!

4

0 回答 0