Does a servlet knows the encoding of the sent form that specified using http-equiv?

Posted by Daziplqa on Stack Overflow See other posts from Stack Overflow or by Daziplqa
Published on 2010-05-18T23:29:21Z Indexed on 2010/05/18 23:30 UTC
Read the original article Hit count: 187

Does a servlet knows the encoding of the sent form that specified using http-equiv?

When I specify an encoding of a POSTed form using http-equiv like that:

<HTML>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'/>
</head>
<BODY >
<form name="form" method="post" >
    <input type="text" name="v_rcvname" value="????">
</form>
</BODY>
</HTML>

And then at the servlet I use the method, request.getCharacterEncoding() I got null ! So, Is there a way that I can tell the server that I am encoding the data in some char encoding??

© Stack Overflow or respective owner

Related posts about servlets

Related posts about character-encoding