req.getParameter returns values wrong character encoding
Posted
by
coder247
on Stack Overflow
See other posts from Stack Overflow
or by coder247
Published on 2011-06-28T12:53:15Z
Indexed on
2011/06/28
16:22 UTC
Read the original article
Hit count: 224
I'm trying to get values from a JSP using getParameter which includes ü,é,à etc. But get wrong values in servlet. I've checked the content type with firebug and found that
Content-Type text/html;charset=UTF-8
checked the POST section with firebug and found the correct value there, when I try to access it in servlet it is wrong. Gives ö instead of ö
req.getCharacterEncoding();
returns null.
Tried with setting
req.setCharacterEncoding("UTF-8");
at the beginning of servlet but didn't help.
© Stack Overflow or respective owner