<%@ page language="java" contentType="text/html; charset=gb2312"  %>
将<meta http-equiv=\"content-type\" content=\"text/html; charset=gb2312\">
删除

解决方案 »

  1.   

    response.setContentType("text/html; charset=gb2312");
    String tmp = request.getParameter("tmp");
    却省应该是iso8859_1格式
    ???直接存入oracle数据库???
    如果上成立
    ???从数据库中取数据为iso8859_1格式???
    转化成tmp = new String(tmp.getBytes("ISO8859_1"),"gb2312");
    输出
    <%@ page language="java" contentType="text/html; charset=gb2312"  %>
    或者
    <meta http-equiv="content-type" content="text/html;charset=gb2312">
    out.println(tmp);乱码我觉得这两句
    <%@ page language="java" contentType="text/html; charset=gb2312"  %>
    <meta http-equiv="content-type" content="text/html;charset=gb2312">
    没什么区别吧
    都是设字符集
    我也已经试过了
    不行 一堆的问号
      

  2.   

    用我的方法试试你用的什么JDBC驱动?
      

  3.   

    情况一:
    JSP 文件中的中文提示信息不能正确显示 
    解决方法:在JSP 文件中加入  <%@ page contentType="text/html; charset=GBK" %>   可以解决这个问题  情况二:
    从数据库中检索出来的中文显示不正确时,在这种情况下,如果数据库使用的是中文字符集,并使用的是Type 2 Jdbc Driver时,对于Weblogic 而言,当使用其提供的oci driver时,在设置连接池的propteries时可加入Weblogic.codeset=GBK的属性可解决这个问题 Thin driver 不需要做任何设置    情况三:
    在JSP文件之间传递中文时,如果不能正确传递中文数据,可在web.xml文件中加入  <context-param> <param-name>weblogic.httpd.inputCharset./*</param-name> <param-value>GBK</param-value> </context-param>   可解决这个问题。   情况四:
    为使浏览器能正确显示中文,应在 HTML HEAD 部分增加:  <meta http-equiv="Content-Type" content="text/html" charset="gbk">