javaURL編碼:java.net.URLEncoder.encode(strMi);
解碼:java.net.URLDecoder.decode(strMi);
地址欄傳參轉(zhuǎn)碼
public static String ExChs(String s) {
String sr = "";
if (s == null) {
s = "";
}
try {
sr = new String(s.getBytes("iso-8859-1"), "utf-8");
} catch (Exception e) {
sr = s;
}
return sr;
}
解碼:java.net.URLDecoder.decode(strMi);
地址欄傳參轉(zhuǎn)碼
public static String ExChs(String s) {
String sr = "";
if (s == null) {
s = "";
}
try {
sr = new String(s.getBytes("iso-8859-1"), "utf-8");
} catch (Exception e) {
sr = s;
}
return sr;
}