你在哪里用的?
jsp中,在开始处增加:
<%@ page contentType="text/html; charset=GB2312"%>

解决方案 »

  1.   

    如果是在JAVA类中,可以在定义变量之加上这么一句:
    str=new String(str.getBytes(),"ISO8859-1");
    然后再输出.
      

  2.   

    str=new String(str.getBytes(),"GBK");
    也可以试试
      

  3.   

    如果是在LINUX console下的话。那是肯定看不到的要安装中文控制台,比如zhcon
      

  4.   

    <%@ page contentType="text/html; charset=GB2312"%>
      

  5.   

    如果在java类中就用
    str=new String(str.getBytes(),"ISO8859-1");如果在jsp中就加上
    <%@ page contentType="text/html; charset=GB2312"%>