一样的
我的字串如下Y249NAXRNbplhls5MDAwMDAw
谁帮忙解解看

解决方案 »

  1.   

    转换的方式只有两种,它们可以转换所有的乱码:
    public class clsZiFuZH{
        public static String CliToServ(String in)
        {
            String s = null;        if (in == null)
            {
                return new String("");
            }
            try
            {
                byte by []=in.getBytes("iso-8859-1");
                s = new String(by,"GB2312");
            }
            catch(UnsupportedEncodingException e){}        return s;
        }
        public static String ServToCli(String s)
        {
            String temp = "";
            if (s == null){
                return "";
            }
            try
            {
                byte [] by = s.getBytes("GB2312");
                temp = new String(by,"8859_1");
                return temp;
            }
            catch(UnsupportedEncodingException e){}
            return temp;
        }
    }
    如果还是不行,可能与用的webserver有关
      

  2.   

    s=new String(s.getBytes("GBK"),"ISO8859_1");
      

  3.   

    str = new String(s.getBytes("GB2312"),"ISO8859_1");