Text = new String(Text.getBytes("GB2312"), "ISO8859_1");
写反了

解决方案 »

  1.   

    有一个很好的解决办法在页面的<head></head>中添加:
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312">同时jsp脚本添加:
    <%@ page contentType="text/html;charset=ISO8859_1" %>还没有不能搞定的
      

  2.   

    <%@ page contentType="text/html;charset=gb2312" %>Text = (new String(Text.getBytes("8859_1"), "Gb2312")).trim();试试这样
      

  3.   

    这些方法都试了,都不行。
    最后没办法,试了charset=utf-8,用UNICODE。
    可以了,可是不知道有没有什么隐患。
      

  4.   

    GBToUnicde 
    还没有不行的呢