https://issues.apache.org/bugzilla/show_bug.cgi?id=45406
Summary: Decoding URI encoded in UTF-16 does not work correctly. Product: Tomcat 6 Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] The request URL decoder component is not doing it's job correctly for UTF-16. URL encoding rules state that URLs are encoded in ASCII, while non-ascii characters and special characters are encoded using the % encoding, using a specified charset. The problem is that the UDecode and ByteChunk classes used to decode request URLs in catalina do not work according to these rules: UDecode converts all the % encodings to bytes, and then ByteChunk.toString converts the whole buffer to a string according to the specified encoding. So, a UTF-16-encoded URL that looks like this: http://a.com?utf16parameter=%D%7 which is decoded properly with java's URLDecoder.decode() method, is not decoded properly by catalina, since the characters 'http://a.com?utf16parameter=' are not UTF-16 characters. UDecode convert %D%7 to bytes, but then ByteChunk chokes when trying to decode the whole string as UTF-16, while %D%7 are the only bytes it should have attempted to decode. Don't tell me to use UTF-8 in my pages so that the browsers will use UTF-8 to encode, I'm in a situation where this is impossible. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]