dcsimg
How do I pass Japanese values to a servlet?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mubariz_Kharbe
Posted On:   Monday, June 10, 2002 09:26 PM

I am passing Japanese values to a servlet and I am retreiving the data using



String getData = new String(request.getParameter("MyData").getBytes("8859_1"),"UTF8");



But I get the value of getData as ??.



I have set the charset to utf-8 in the HTML page from which the servlet is being called.



What else do I need to do to get the data correctly?



TIA

Mubariz

Re: How do I pass Japanese values to a servlet?

Posted By:   Mehul_Jasani  
Posted On:   Monday, July 1, 2002 07:09 PM

Hi ,

If you are using servlet 2.3 supporting web server then use request.setCharacterEncoding("shift_jis"), here I have given shift_jis, you can use any encoding based on your input.

Please note that this works only with servlet 2.3 compatible web server.

Regards,
Mehul.
About | Sitemap | Contact