views:

412

answers:

2

Heya guys,

I'm in desperate need of help.

I have a Java servlet that is accessed by a HTTP Get URL with eight parameters in it. The problem is that the parameters are not exclusive to English. Any other language can be in those parameters, like Hebrew, for example.

Now, when I send the data - either from the class that is supposed to send the Get request or simply from the browser's address bar, the query that I see in debug (Netbeans) has gibberish characters and the Parameters themselves, post request.getParameter are ???? question marks.

How or where would I go about solving this?

A: 
erickson
A: 

I suspect your server is in UTF-8 mode but your URL is encoded as Latin-1. What kind of question marks are you getting, "?" or "�" ? This will shed light on who is doing the conversion.

You need to change your connector to Latin-1 by adding URIEncoding="ISO-8859-1" attribute, or you can re-encode the URL in UTF-8.

If the URL is encoded by browser, you are hosed. There is no solution because it could go either way depending on the browsers. See my question,

http://stackoverflow.com/questions/1233076/handling-character-encoding-in-uri-on-tomcat

ZZ Coder