W3C home > Mailing lists > Public > www-international@w3.org > April to June 2003

non-ASCII characters in the HTTP Content-Disposition filename parameter

From: Steve Billings <billings@global360.com>
Date: Thu, 10 Apr 2003 15:52:08 -0400
Message-ID: <3E9464FE00001C39@mta6.wss.scd.yahoo.com>
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

RFC 2184 (http://www.faqs.org/rfcs/rfc2184.html) seems to say it can't be

   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!!

(And if you also happen to know how to convert to that form using Java,
that would be a bonus.)
Steve Billings
+1 978-266-1604
Received on Thursday, 10 April 2003 15:52:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:40:47 UTC