呵呵,取出来的时候有没有转化为iso-8859-1?

解决方案 »

  1.   

    //Asc编码转换为Unicode编码
        public static String AscToUni(String asc)
        {
            try
            {
                String uni; // = new  String(asc.getBytes("ISO8859-1"),"GB2312").trim();
                if (asc != null)
                  uni = new  String(asc.getBytes("ISO8859-1"),"GB2312").trim();
                else
                  uni = null;
                return uni;
            }
            catch(java.io.UnsupportedEncodingException e)
            {
                return null;
            }
            
        }
      

  2.   

    使用getBytes("ISO8859-1"),"GB2312")这个方法就可以了。能显示出中文