str = new String(str.getBytes("8859_1),"xxx");

解决方案 »

  1.   

    我试过用str = new String(str.getBytes("8859_1),"cp850");也用过一些其它的字符集但总是不好使。
      

  2.   

    str = new String(str.getBytes(“8859_1”),"JISAutoDetect");
      

  3.   

    str = new String(str.getBytes("8859_1));
    =》》str = new String(str.getBytes("ISO8859_1));
      

  4.   


    试一下下面这个方法:          public String getStr(String str){                   try{ String temp_p=str;
    byte[] temp_t=temp_p.getBytes("ISO8859-1");
    String temp  =new String(temp_t);
    return temp;
    }
    catch(Exception e){
    return "null";
    }
    }