URLEncoder.encode not working in netscape for special characters
Hi all,
I have the following code in a jsp.
searchString = request.getParameter("searchString");
java.net.URLEncoder.encode(java.net.URLEncoder.encode(searchString,"UTF-8"),"U TF-8");
this was not working for special character ? It gets converted to ?.
I changed the code as given below:
searchString = request.getParameter("searchString");
searchString = new String(searchString.getBytes("ISO-8859-1"),"UTF-8");
java.net.URLEncoder.encode(java.net.URLEncoder.encode(searchString,"UTF-8"),"U TF-8");
It worked in IE but failed in netscape. I also tried adding these two lines in the beginning of the jsp.
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
but it was of no use.
Please suggest a way to make it work in netscape also.
Thanks in advance.

