tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24380] New: - Tomcat cannot support file download with non-ISO characters filename
Date Tue, 04 Nov 2003 11:17:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24380>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24380

Tomcat cannot support file download with non-ISO characters filename

           Summary: Tomcat cannot support file download with non-ISO
                    characters filename
           Product: Tomcat 4
           Version: 4.1.29
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: kenneth.y.kwan@pccw.com


The problem seems is a header encoding proglem. Tomcat 4.1.29 always return 
headers encoded in UTF8 irrespective of content type and any other settings. 
This casued browser(MSIE) cannot download file with correct non-ISO characters 
filename. There is no such problem found in 4.0.6 which outputs the filename in 
headers with ISO encoding.

Have tried charset=Big5, ISO8859-1, ..., all failed.

Example:

// filename obtained from file system in ISO format and convert to correct xxx 
encoding
filename=new String(filename.getBytes("ISO8859-1"), "xxx");
response.setContentType("application/x-download;charset=xxx"); 
response.setHeader("Content-Disposition", "filename="+filename);
ServletOutputStream out = response.getOutputStream();
// ... read the file from disk and write to user
out.close();

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message