Hi !

I have a problem with national character in
html form input under tomcat, I wrote a
bug report http://jakarta.apache.org/bugs/show_bug.cgi?id=66,
but it was closed as invalid.
Same bug report was post to JDC:
http://developer.java.sun.com/developer/bugParade/bugs/4154966.html,
and it also closed.
But problem still exists and this problem is in
parsing query string both in tomcat and in jsdk.jar,
they both use the same code for converting string
from application/x-www-form-urlencoded:
sb.append((char) Integer.parseInt(s.substring(i+1, i+3), 16));
(javax.servlet.http.HttpUtils class parseName metod)

It is wrong to cast int (byte) in national language to char which is
unicode. Do you really think that if I have byte 0xC0 (this is russian
character "A" in Cp1251 encoding) I will receive char 0x0410
(this is the same character in unicode)?
There must be casting to byte and then encoding this byte to
char with servlet request encoding. See for example sources
of Resin servlet engine (http://www.caucho.com), it works fine.

I am very surprised that this simple problem is still not solved.
Can anybody from Sun servlet team explain this ?

Thank you,
Vyacheslav Pedak

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to