View Full Version : utf8 encoding decoding

20 Jun 2007, 12:48 AM
Hi I've been reading through the forum threads on this topic and i'm still a little confused, therefore i was hopeing someone could point me in the right direction

I'm sending utf8 data from the browser to the (Java) server using the JSON.encode method but text at the server end isn't being decoded properly...

I found in a post from Animal the following link for decoding a bytestream in Java (to UTF8):


however I'm using a servlet and from the HttpServletRequest.getParameter method I only get a string, does anyone know how to decode the request params in Java from the String?

Many thanks in advance

20 Jun 2007, 12:57 AM
check out:


or just add


to you r doPost method in your servlet