遇到java里的URLEncoder.encode方法编码后与javascript的encodeURIComponent方法的结果有点不一样,找了一下资料,原来URLEncoder实现的是HTML形式的规范,jdk文档里这么说: Utility class for HTML form encoding. This class contains static methods for converting a String to the application/x-www-form-urlencod…