<%@ page contentType="text/html; charset=GBK" %>这句有没有加上SQLServer做数据库时,不需要编码转换

解决方案 »

  1.   

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

  2.   

    我用的是Access2000,加了<%@ page contentType="text/html;charset=gb2312" %>
    也不行
      

  3.   

    用:
    String titl,autho,titl2,autho2;
    titl2=getStr(RSa.getString("title"));
    autho2=getStr(RSa.getString("author"));
    titl=new String(titl2.getBytes("iso8859_1"),"gb2312");
    autho=new String(autho2.getBytes("iso8859_1"),"gb2312");
    out.print("<tr><td align='center'><font size='4'><b>");
    out.print(titl);
    out.print("</b></font></td></tr>");
    试试