Bug 20407
| Summary: | Safari/Webkit doesn't support Non US-ASCII filenames in Content-Disposition header | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Robbie Paplin <rpaplin> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | OS X 10.5 | ||
Robbie Paplin
As per RFC 2184 & 2231, if one wants the web browser to properly display a filename that contains Unicode characters in the File Download dialog box, you must encode the filename as URL-encoded UTF-8 in the Content-Disposition field.
Let's say I want to download an image named 2008年8月8日.jpg
The server should send down the following header
Content-Disposition: attachment; filename*="2008%e5%b9%b48%e6%9c%888%e6%97%a5.jpg"
In Firefox it works as expected (Note: it appears Firefox supports multiple ways of encoding international filenames. For example, the following header also gives the desired result.
Content-Disposition: attachment; filename="2008\345\271\2648\346\234\2108\346\227\245.jpg"
In IE, if you omit it the asterisk after the filename filed it works (like so)..
Content-Disposition: attachment; filename="2008%e5%b9%b48%e6%9c%888%e6%97%a5.jpg"
I've yet to see this work in Safari using any web application (I've tried Gmail, Hotmail, Windows Live Skydrive) or any of the above methods.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Mark Rowe (bdash)
*** This bug has been marked as a duplicate of 15287 ***