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,"%");

原文地址:https://www.cnblogs.com/stono/p/4772630.html