中文编码的处理

js URL参数中文编码:encodeURI(encodeURI(参数))。

java解码:filePath = URLDecoder.decode(filePath, "UTF-8");

 

filter里面:httpResponse.setCharacterEncoding("UTF-8");

httpRequest.setCharacterEncoding("ISO8859-1");
httpResponse.setCharacterEncoding("UTF-8");

你可能感兴趣的:(编码)