new String(str.getBytes("8859_1"),"UTF-8");

解决方案 »

  1.   

    似乎是new String(str.getBytes("ISO8859_1"),"GB2312");
      

  2.   

    应该是 new String(str.getBytes("ISO8859-1"),"GB2312"); 
      

  3.   

    你是用什么输出的?
    OutputStream or PrintWriter?
    这两个垃圾输出的中文结果有时候是不同的
      

  4.   

    PrintWriter 是可以的
    用我上面提到的方法不可以吗?
      

  5.   

    new String(str.getBytes("UTF-8"),"UTF-8"); 
      

  6.   

    char c[] = src.toCharArray();
    byte b[] = new byte[c.length];
    for (int i = 0; i < c.length; i++)
     b[i] = (byte) c[i];
    str =  new String(b);
      

  7.   

    试试new String(str.getBytes(),"GB2312");