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/16 19:24:12 UTC

BugRat Report #785 has been filed.

Bug report #785 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com/BugRatViewer/ShowReport/785>

REPORT #785 Details.

Project: Servlet API
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: high
Severity: critical
Confidence: public
Environment: 
   Release: 4.0.b1
   JVM Release: 1.3
   Operating System: Linux (Mandrake)
   OS Release: 7.2
   Platform: Intel

Synopsis: 
Use setCharacterEncoding("UTF8") does not change the way getParameterValue*() decodes characters.

Description:
I am testing the support of UNICODE input and output for Java servlets and JSP's.  I have a very simple servlet that creates a web page with a single entry field.  When the ServletResponse is created, I use setContentType("text/html charset=UTF-8") to tell the web browsers this page contains eight bit compressed unicode.  This works, the data is placed from the servlet onto the web page in UTF8 style, and displayed by the web browser (IE and Netscape) correctly.  
However, when data is entered by the web browser, the getParameterValues method ignores the character encoding and maps each byte to a seperate character.  It fails even when I use the setCharacterEncoding("UTF8") method on the request before reading any parameter names or values.  
Support of character encoding on request input is critical to any users outside of Latin-1.