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: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]