- From: Steve Billings <billings@global360.com>
- Date: Thu, 10 Apr 2003 15:52:08 -0400
- To: www-international@w3.org
- Cc: billings@global360.com
From a Java servlet, via HTTP, I would like to send a file to a browser
for download to the user's system. The filename is transmitted to the browser
in the HTTP "Content-Disposition" header. It is being set via Java using:
res.setHeader("Content-Disposition", "attachment; filename=\""+savefile+
"\";");
This works with ASCII (and maybe even ISO-8859-1) characters, but not with
Japanese.
RFC 2184 (http://www.faqs.org/rfcs/rfc2184.html) seems to say it can't be
done:
Current [RFC 2045] grammar restricts parameter values (and hence
Content-Disposition filenames) to US-ASCII. We recognize the great
desirability of allowing arbitrary character sets in filenames, but
it is beyond the scope of this document to define the necessary
mechanisms. We expect that the basic [RFC 1521] `value'
specification will someday be amended to allow use of non-US-ASCII
characters, at which time the same mechanism should be used in the
Content-Disposition filename parameter.
Is there some form (newer than RFC 2184) that enables non-ASCII characters
in the HTTP Content-Disposition filename parameter value?
Thank you!!
Steve
(And if you also happen to know how to convert to that form using Java,
that would be a bonus.)
---
Steve Billings
billings@global360.com
www.global360.com
+1 978-266-1604
Received on Thursday, 10 April 2003 15:52:15 UTC