You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by BugRat Mail System <to...@cortexity.com> on 2001/01/12 19:09:18 UTC

BugRat Report #753 - req.getParameter(name) Ignores charset. always assumes ISO8859-1.

Report #753 Details

Project: Servlet API
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: high
Severity: critical
Confidence: public
Environment: 
   Release: Tomcat 3.2.1
   JVM Release: 1.3
   Operating System: Linux / NT
   OS Release: 7.2 / 4.51
   Platform: Intel

Synopsis: 
req.getParameter(name) Ignores charset. always assumes ISO8859-1.

Description:
I have an application that allows the user to enter UNICODE 
characters on the WEB browser.
The web page is "rsp.setContentType("text/html; charset=UTF8");"
which enables UNICODE support on both IE and NetScape.
When I use "req.getParameter(name)" to get the user input, 
it is not decoded correctly.  Each byte of the UTF8 stream 
is placed in a seperate character. (as if a deprecated String 
constructor "String(bytearray,0,0,length)" is being used to 
convert the bytes into a String).  
This behavior is WRONG!
Java 2 classes should not use deprecated methods!
Also, it destroys important information needed to convert 
the input byte stream into it's correct UNICODE String 
representation.
Please tell me who supports javax.servlet.
Tim Tye -- Tim_Tye@usa.net