开发者

Unescape url in java

I am trying to unescape a URL in java.

Is there some tool or library for that ?

example : filter=Screen+Refresh+Rate%7C120HZ%5EScreen+Size%7C37+in.+to+42+in.

I need this in the 开发者_如何学Pythonnormal form.


URLDecoder.decode(String s,"utf-8") will work if s is encoded in application/x-www-form-urlencoded.

String s = URLDecoder.decode("filter=Screen+Refresh+Rate%7C120HZ%5EScreen+Size%7C37+in.+to+42+in.", "utf-8");
System.out.println(s);

Output

filter=Screen Refresh Rate|120HZ^Screen Size|37 in. to 42 in.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜