On 6/5/07, Shankar Unni <[EMAIL PROTECTED]> wrote:
(the page was already set to character
encoding Big5), the encoded value sent in the URL was rather screwy:
The original character is (Big5) 0xAE 0x78.
The URL sent by IE said "%AEx". (!!)
Did you also configure the web.xml properly ?
It should have
<context-param>
<param-name>PARAMETER_ENCODING</param-name>
<param-value>Big5</param-value>
</context-param>
Are you setting the request parameter correctly before reading the parameter?
String paramEncoding = application.getInitParameter("PARAMETER_ENCODING");
request.setCharacterEncoding(paramEncoding);
Now Java's URLDecoder.decode(s, "Big5") doesn't like the above encoding:
it insists that both characters be encoded, or neither - it ends up
decoding this into "?x".
However, Tomcat actually returns the correct single chinese character
from "request.getParameter("userid")".
Is it doing the URL decoding in a different way than Java's built-in URL
decoder?
-Rashmi
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]