你的编码和字符集怎么转来转去的,gb2312就好了,怎么又转成iso了?

解决方案 »

  1.   

    给你一个转换函数,再insert的时候调用
    /**** 字符集的转换函数 ****/
            // added by baiqing 2003.02.18
            public static String charConvert(String strSource){
                if (strSource == null){
                    return "";
                }
                else{
                    try{
                      //return new String(strSource.getBytes("GB2312"), "ISO-8859-1");
                      String str = new String(strSource.getBytes("ISO-8859-1"), "GB2312");
                      System.out.println(str);
                      return str;
                    }
                    catch (Exception ex){
                      System.out.println(ex.toString());
                      return "";
                    }
                }
            }