1 js到java
js中url参数编码
var orgname="濮阳市人民医院";
orgname = encodeURI(encodeURI(orgname));
java中url解码
string orgname = ud.decode(paramap.get("ORGNAME"), "UTF-8");
2 java到java
编码:
String orgname= "濮阳市人民医院";
orgname=java.net.URLEncoder.encode(orgname, "UTF-8");
orgname=java.net.URLEncoder.encode(orgname, "UTF-8");
解码:
String orgname=java.net.URLDecoder.decode(mapParam.get("ORGNAME").toString(), "UTF-8");