DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27796>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27796

apache2/mod_jk/tomcat4 - downloading files with special characters in the filename

           Summary: apache2/mod_jk/tomcat4 - downloading files with special
                    characters in the filename
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Connector:Coyote JK 2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Problem:
In my tomcat webapp a servlet manages a filedownload. Clicking on a file-link 
results in the browser's 
"save as" dialog (IE6, Netscape7, Firebird0.7, Opera 7). 
Using tomcat alone (port 8080) everything works fine. Special characters (like 
German umlaut) are shown 
in ISO-8859-1.
Apache2/mod_jk seems to change the charset to UTF-8, e.g. "täst.txt" looks 
like "tät.txt".
Apache's default charset is set to ISO-8859-1 (httpd.conf).

Servlet Code:
response.setHeader("Content-Disposition", "attachment; filename=" + file.getName
());
response.setContentLength((int)file.length());
response.setContentType("application/octet-stream");
response.setHeader("Content-Transfer-Encoding", "binary");

Configuration:
- Apache 2.0.48 
- Tomcat 4.1.18 
- mod_jk 4.1.18
- $tomcat_home/bin/catalina.sh:
        export CATALINA_OPTS="-Dfile.encoding=ISO-8859-1 -Duser.language=de -
Duser.country=DE"

Greetings Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to