与php的rawurldecode方法对应的java是怎么实现的?URLDecoder.decode? 5
与php的rawurldecode方法对应的java是怎么实现的?URLDecoder.decode?0JAVA:Stringa="%076%25.ze%5E%5B%9D...
与php的rawurldecode方法对应的java是怎么实现的?URLDecoder.decode?0
JAVA:
String a = "%076%25.ze%5E%5B%9D%01%A8g%5E%B5%5E7%E8%250%EC%1B%E8wt%F7%9B%DB%23%CE%EF%CF%EC%81%8F%B7%95%D0G%0A%C4";
URLDecoder.decode(new String(aaa.getBytes(),"gbk");
PHP
<?php
$aaa = "%076%25.ze%5E%5B%9D%01%A8g%5E%B5%5E7%E8%250%EC%1B%E8wt%F7%9B%DB%23%CE%EF%CF%EC%81%8F%B7%95%D0G%0A%C4";
echo rawurldecode($aaa);
?>
获得的值不同。请问对应什么方法呀怎么实现 展开
JAVA:
String a = "%076%25.ze%5E%5B%9D%01%A8g%5E%B5%5E7%E8%250%EC%1B%E8wt%F7%9B%DB%23%CE%EF%CF%EC%81%8F%B7%95%D0G%0A%C4";
URLDecoder.decode(new String(aaa.getBytes(),"gbk");
PHP
<?php
$aaa = "%076%25.ze%5E%5B%9D%01%A8g%5E%B5%5E7%E8%250%EC%1B%E8wt%F7%9B%DB%23%CE%EF%CF%EC%81%8F%B7%95%D0G%0A%C4";
echo rawurldecode($aaa);
?>
获得的值不同。请问对应什么方法呀怎么实现 展开
2013-01-20
展开全部
你写出来PHP得出的结果,看看JAVA的哪个方法更合适
追答
那其实,这个接近的
String a = "%076%25.ze%5E%5B%9D%01%A8g%5E%B5%5E7%E8%250%EC%1B%E8wt%F7%9B%DB%23%CE%EF%CF%EC%81%8F%B7%95%D0G%0A%C4";
String ss=URLDecoder.decode(new String(a.getBytes(),"gbk"), "gbk");
System.out.println(ss);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询