java调用ajax出现乱码解决办法
需要在接收的时候对HttpConnection加入三个编码设置:
connection.setRequestProperty("Content-type", "text/html");
connection.setRequestProperty("Accept-Charset", "utf-8");
connection.setRequestProperty("contentType", "utf-8");
需要在接收的时候对HttpConnection加入三个编码设置:
connection.setRequestProperty("Content-type", "text/html");
connection.setRequestProperty("Accept-Charset", "utf-8");
connection.setRequestProperty("contentType", "utf-8");