javascript与java编码互转

java:

java.net.URLEncoder.encode(s, "UTF-8");

java.net.URLDecoder.decode(chezhanInEn,"UTF-8");

str.replaceAll("%", "-")

javaScript:

encodeURI(cz);

decodeURI(cz);

str.replace(/-/g,"%");