最近在弄一个模拟登陆的程序,拿某网站调试程序,但response返回的总是乱码。 Google了半天,用了各种方法依旧乱码。 使用的方法: if(HttpStatus.SC_OKresponse.getStatusLine().getStatusCode()){ entity=response.getEntity(); if(entity!=null){ //第一种方式 System.out.println(EntityUtils.toString(entity,"GBK"));//第二种方式 Stringoutstr=newString(EntityUtils.toString(enti...