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 44435] New: - Inaccuracies in the ISO-8859-1 character encoder
Date Sat, 16 Feb 2008 00:18:53 GMT
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=44435>.
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=44435

           Summary: Inaccuracies in the ISO-8859-1 character encoder
           Product: Tomcat 6
           Version: 6.0.14
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: corey@exploringsolutions.com


In a servlet request handler, I have the following code:

response.setContentType("text/json");
response.setHeader("Cache-Control", "no-cache");
PrintWriter pw = response.getWriter();
System.out.println("Response: " + response.getClass().getName());
System.out.println("Encoding: " + response.getCharacterEncoding());
System.out.println("PrintWriter: " + pw.getClass().getName());
pw.write("");
pw.flush();

The stdout log shows:
Response:
org.acegisecurity.context.HttpSessionContextIntegrationFilter$OnRedirectUpdateSessionResponseWrapper
Encoding: ISO-8859-1
PrintWriter: org.apache.catalina.connector.CoyoteWriter

Yet the actual response was "?" instead of "", even though this character is
part of the later character set (ISO-8859-1)!

The following scenarios all send back the expected result (""):
 * The content type set to "text/json; charset=ISO-8859-1" (weird!)
 * The content type set to "text/json; charset=UTF-8"
 * The exact same code run in Jetty

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message