在文件头加入一句
<%@ page contentType="text/html;charset=gb2312" %> 

解决方案 »

  1.   

    http://www.csdn.net/develop/read_article.asp?id=3480
    http://www.csdn.net/develop/read_article.asp?id=7599
    http://www.csdn.net/develop/read_article.asp?id=7474
    http://www.csdn.net/develop/read_article.asp?id=6660
    http://www.csdn.net/expert/topic/149/149694.shtm  
      

  2.   

    同意<%@ page contentType="text/html;charset=gb2312" %> 
    请以后遇到问题,自己先查找一下或看一下以前的贴子
      

  3.   

    <%@ page contentType="text/html;charset=gb2312" %>这样是可以的,但FORM提交的汉字还是看不到,我给你一个函数,经过转换后FORM的汉字乱码问题也可解决!
    public String getStr(String str)
      {
         try
       {
         String temp_p=str;
     byte[] temp_t=temp_p.getBytes("ISO8859-1");
     String temp=new String(temp_t);
     return temp;
       }
     catch(Exception e)
      {
     
     }
    return "null";
      }String charHZ=getStr(request.getParameter("name"));
      

  4.   

    谢谢1!知道了1!
    是<%@ page contentType="text/html;charset=gb2312" %> 那分不分简体和繁体????
      

  5.   


    <%@ page contentType="text/html;charset=gb2312" %> 
    <%
       out.println("中文");
    %>
    一样乱码!
      

  6.   

    简体用charset=gb2312
    繁体用charset=big5
    呀!