Thank you guys. Sounds like I need to either write or find a method that converts strings to UTF-8. I'll try this tomorrow.

BTW I am not using HTML forms, just building URIs dynamically and sticking them into <a href=...> anchors. That's where the GET part comes into play :)

Cheers,

-Ramez

Markus Schönhaber wrote:
Ramez Ghazzaoui wrote:

Today I realized that this very solution has broken the Java
request.getParameter() method in JSP. Now, with the URIEncoding set to
UTF-8, this Java method is misinterpreting non-English characters. When
I invoke from the browser the following address:
http://localhost/main.jsp?path=olé (or the equivalent
http://localhost/main.jsp?path=ol%E9) a call to
request.getParameter("path") from within main.jsp returns ol? where the
question mark is character number 65533. That's way off from 233 (which
is the correct U-dec for eacute, or é).

If you tell Tomcat that you'll provide URIs which are encoded in UTF-8 then do as you said and provide UTF-8-encoded URIs. Your example above should therefore look like
http://localhost/main.jsp?path=ol%C3%A9

If you're using HTML-forms with method="GET", set the accept-charset attribute 
of the form to UTF-8.

---------------------------------------------------------------------
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