<p dir="auto">I ues python 2.7.9 and requests 2.5.1<br>
when I do like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="files = {'file1':('中文','hello')}
r = requests.post('http://test',files=files)"><pre class="notranslate"><code class="notranslate">files = {'file1':('中文','hello')}
r = requests.post('http://test',files=files)
</code></pre></div>
<p dir="auto">the request is like this(copy from fiddler):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Content-Disposition: form-data; name=&quot;file1&quot;; filename*=utf-8''%E4%B8%AD%E6%96%87"><pre class="notranslate"><code class="notranslate">Content-Disposition: form-data; name="file1"; filename*=utf-8''%E4%B8%AD%E6%96%87
</code></pre></div>
<p dir="auto">I think the format of filename is wrong.</p>
<p dir="auto">the right format should be:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Content-Disposition: form-data; name=&quot;file1&quot;; filename=&quot;中文&quot;"><pre class="notranslate"><code class="notranslate">Content-Disposition: form-data; name="file1"; filename="中文"
</code></pre></div>
<p dir="auto">This code:</p>
<p dir="auto">requests.post(url, files={"file": open(u"漢字.o8d", "r")})</p>
<p dir="auto">will return a 200, but the file is never uploaded.</p>
<p dir="auto">I can upload that file by posting in the browser so this doesn't seem to be a server-side issue. Also, if I change the name of the file to "bob" or something ASCII it works perfectly.</p>