We were playing around with a little JSP application, and trying to submit (and handle) Big5 characters.

(The real purpose was to exercise our primary app which sniffs HTTP traffic and "does stuff" with the raw data it captures - it sees the headers and body as sent over the wire.)

One odd thing we noticed was that when we sent in a single (two-byte) Big5 character in a form field (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". (!!)

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?


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to