正如标题所说……
我从htto响应中读到了内容
原文链接:https://www.f2er.com/windows/542914.html我从htto响应中读到了内容
InputStream is = response.getEntity().getContent(); String cw = IoUtils.toString(is); byte[] b = cw.getBytes("Cp1250"); String x = StringUtils.newStringUtf8(b); String content = new String(b,"UTF-8"); System.out.println(content);
我尝试了很多变化.我对用作字符串的正确编码常量有点困惑. windows-1250或Cp1250. UTF-8或utf-8还是utf8?