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 -- [EMAIL PROTECTED]Title: BugRat Report # 753
BugRat Report # 753
Project: Servlet API | Release: Tomcat 3.2.1 |
Category: Bug Report | SubCategory: New Bug Report |
Class: swbug | State: received |
Priority: high | Severity: critical |
Confidence:
public
|
Submitter:
_Anonymous ( [EMAIL PROTECTED] )
Date Submitted:
Jan 12 2001, 12:08:22 CST
Responsible:
Z_Tomcat Alias ( [EMAIL PROTECTED] )
- Synopsis:
- req.getParameter(name) Ignores charset. always assumes ISO8859-1.
- Environment: (jvm, os, osrel, platform)
- 1.3, Linux / NT, 7.2 / 4.51, Intel
- Additional Environment Description:
- public String(byte[] ascii, int hibyte, int offset, int count) Deprecated. This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String
- Report 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 -- [EMAIL PROTECTED]
- Workaround:
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]