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=28352>.
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=28352

cyrillic encoding windows-1251for HTTP response conflicts with HTTP GET requests 
decoding

           Summary: cyrillic encoding windows-1251for HTTP response
                    conflicts with HTTP GET requests decoding
           Product: Tomcat 5
           Version: 5.0.19
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When we submit a cyrillic text with this JSP:


<%@ page contentType="text/html;charset=windows-1251" %>
<form method="GET" action="bug.jsp">
        <input type="text" name="param">
        <input type="submit">
</form>
<%
        request.setCharacterEncoding("cp1251");
        String param = request.getParameter("param");
%>
Parameter = <%= param %>


we obtain questionmarks instead of cyrillic characters.

I seems that it is a bug. I tested in on Tomcat 4.1.24 and worked well.

Also if I use HTTP POST method, it works.
Also if I skip to set the response encoding (<%@ page 
contentType="text/html;charset=windows-1251" %>) it works.

The problem persists with any browser (I tested with IE 6.0 and Mozilla 1.6).

It seems that setting response's encoding to windows-1251
causes parameters comming from HTTP GET request to be decoded incorrectly.

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

Reply via email to