url带中文,后台需要使用urllib中的unquote,示例
file = “/%s"%(unquote(suffix_name))
写以file为名称的文件是,需要encode一下,示例
with open(file.encode('utf8'), 'wb') as f:
查看更多关于python2 url 带中文并写入中文路径的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did169007
url带中文,后台需要使用urllib中的unquote,示例
file = “/%s"%(unquote(suffix_name))
写以file为名称的文件是,需要encode一下,示例
with open(file.encode('utf8'), 'wb') as f:
查看更多关于python2 url 带中文并写入中文路径的详细内容...