解决HttpClient访问URL中文问题
org.apache.commons.httpclient.URI uri = new org.apache.commons.httpclient.URI("http://localhsot:8080/你好", false, "utf-8");
System.out.println(uri.toString());
输出:http://localhsot:8080/%E4%BD%A0%E5
原创
2013-11-07 15:43:03 ·
3389 阅读 ·
0 评论