Hi,
I receive the http request in my
servlet and since I have to provide support for kanji characters etc. before any processing I am converting the received request
string into UCS encoded string with the bytes using UTF-8 encoding
like,
String ucsString = new String(_req.getParameter("string").getBytes(),"UTF-8");
But this works fine if I receive request from a browser having default encoding as "UTF-8" and it fails if the browser is having an encoding Western Europian "ISO" and surprisingly the _req.getParameter("string") only returns me correct string.
My application is in NT machine and jdk1.3
I am writing response.setContentType("text/html; charset=UTF-8")
Can anybody help me to solve the problem as I can't force user to change its default browser encoding to UTF-8.
Thanks in advance
Varun.