Your name is:
<%out.println(new String(request.getParameter("name").getBytes("iso-8859-1"),"gb2312"));%>
Your email is:
<%out.println(new String(request.getParameter("name").getBytes("iso-8859-1"),"gb2312"));%>
</BODY>
试一试
<%out.println(new String(request.getParameter("name").getBytes("iso-8859-1"),"gb2312"));%>
Your email is:
<%out.println(new String(request.getParameter("name").getBytes("iso-8859-1"),"gb2312"));%>
</BODY>
试一试
那上面的中文:"姓名","电子邮箱"也是乱码啊
那凡是有中文的地方都要这样转换起不是太麻烦了啊
有没有更好的办法,让Tomcat能识别中文~
在线等~~~~~~~~~~
你说的方法很好用~
那上面的中文:"姓名","电子邮箱"也是乱码啊
那凡是有中文的地方都要这样转换起不是太麻烦了啊
有没有更好的办法,让Tomcat能识别中文~
在线等~~~~~~~~~~
这行加到页面顶部
代码开头加上request.setCharactorEncoding("GB2312");