<p dir="auto">current send_file implement a traditional method to assign download filename,<br>
according to RFC 5987 there is a method to have utf-8 encoding in it which is support by all modern browser nowadays,</p>
<p dir="auto">I use this line to make it</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rv.headers['Content-Disposition'] = &quot;attachment; filename*=UTF-8''%s&quot;%(urllib.quote_plus(filename.encode('utf-8')))"><pre class="notranslate"><code class="notranslate">rv.headers['Content-Disposition'] = "attachment; filename*=UTF-8''%s"%(urllib.quote_plus(filename.encode('utf-8')))
</code></pre></div>
<p dir="auto">I am not using headers.add,<br>
because you can see there have to use asterisk character which is nasty</p>
<p dir="auto">ref:</p>
<ul dir="auto">
<li><a href="http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http" rel="nofollow">http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http</a></li>
<li><a href="http://tools.ietf.org/html/rfc5987" rel="nofollow">http://tools.ietf.org/html/rfc5987</a></li>
</ul>
<p dir="auto">Hi.</p>
<p dir="auto">I've detected an issue with supporting unicode filenames in send_file.<br>
If send_file attempts to respond with utf-8 in http headers, the answer is empty, the log contains something like "http-headers should containbe latin-1".<br>
I know that <a href="http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http" rel="nofollow">browser support IS A MESS</a>, but it seems, that sending two filenames (<code class="notranslate">filename=</code> and <code class="notranslate">filename*=</code>) separated by semicolon should work.</p>
<p dir="auto">I'd like this to be handled by flask or werkzeug. Will you accept such pull request?</p>