You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/10/28 11:41:32 UTC
DO NOT REPLY [Bug 24176] New: -
Header Encoding Problem
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=24176>.
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=24176
Header Encoding Problem
Summary: Header Encoding Problem
Product: Tomcat 4
Version: 4.1.27
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: kenneth.y.kwan@pccw.com
Tomcat 4.1.2x seems always returned headers encoded in UTF8 irrespective of
content type setting. This casued browser(MSIE) cannot download file with
correct non-ISO characters filename. There is no such problem found in 4.0.6.
Have tried charset=Big5, ISO8859-1, ..., all failed.
Example:
// filename obtained from file system in ISO format and convert to correct big5
encoding
filename=new String(filename.getBytes("ISO8859-1"), "big5");
response.setContentType("application/octet-stream;charset=xxx");
response.setHeader("Content-encoding","binary");
String resp=filename; // read from disk
response.setHeader("Content-Disposition", "filename="+resp);
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