[webkit-dev] content-disposition, utf-8 and webkit

Dan Winship danw at gnome.org
Mon Apr 13 06:36:27 PDT 2009


Andre-John Mas wrote:
> Hi,
> 
> I am using the Webkit nightlies on MacOS X, and I noticed that the
> following header doesn't seem to give the expected results:
> 
> content-disposition: inline;
> filename*="utf-8''%E8%92%99%E7%89%B9%E5%88%A9%E5%B0%94.vcf"
> 
> In Firefox it provides me a filename with Chinese characters in it.
> Safari/WebKit defaults to using the file name of the java servlet that
> was called. So, given a servlet URL: http://localhost/myservlet.do
> 
> Firefox: 蒙特利尔.vcf
> Safari/Webkit: myservlet.do

Note that that header is syntactically incorrect; it should not have
double-quotes around the value. If you do:

Content-Disposition: inline;
filename*=utf-8''%E8%92%99%E7%89%B9%E5%88%A9%E5%B0%94.vcf

(except not line-wrapped like that) then it might work in Safari as
well. (The Safari devs might consider this a bug anyway given that it
works with the quotes in Firefox though.)

-- Dan


More information about the webkit-dev mailing list