程序对url解码:
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
String deurl = URLDecoder.decode(url,"UTF-8");
必须加编码UTF-8或者正文的编码GB2312
否则就会提示不推荐使用
The method decode(String) from the type URLDecoder is deprecated
,decoder中间会被画一条横线。
---------------------
作者:ispotu
来源:CSDN
原文:https://blog.csdn.net/superit401/article/details/78052965
版权声明:本文为博主原创文章,转载请附上博文链接!