html 传中文参数到java,先把中文转成iso-8859-1格式,再转成utf-8,就可以了
public String urlDecode(String code) throws Exception {
return new String(URLDecoder.decode(code, "iso-8859-1").getBytes(
"ISO-8859-1"), "UTF-8");
}
html 传中文参数到java,先把中文转成iso-8859-1格式,再转成utf-8,就可以了
public String urlDecode(String code) throws Exception {
return new String(URLDecoder.decode(code, "iso-8859-1").getBytes(
"ISO-8859-1"), "UTF-8");
}