进行一下编码的转换
String str2= new String(str1.getBytes(),"8859_1");

解决方案 »

  1.   

    一、做编码转换,
    二、在web.xml中用filter处理,就不需要你再每页都处理了。
      

  2.   

    错了,应该从数据库的字符集入手。。
    比如设置mysql: default-character-set=gbk 之类
      

  3.   

    把你的字符串用这个函数处理一遍就OK了, 不行你找我.
    public String getCNString(String strEnglish)
        {
            String strTemp = null;
            byte[] baTemp = null;
            try
            {
             //=====================================================
             // 注意下面的  ISO-8859-1 可以用 GBK  , 或者 GB2312替换
             //======================================================
                baTemp = strEnglish.getBytes("ISO-8859-1");
                strTemp = new String(baTemp);
            }
            catch (UnsupportedEncodingException ex)
            {
                strTemp = null;
            }
            return strTemp;
        }
      

  4.   

    试下这样吧; s = new String(s.getBytes("iso-8859-1"), "gb2312");