java.net.URLDecoder的一个方法
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
public class TestEncode {
/**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
String urlEncodeUserName = new String("%E5%AD%99%E8%89%BA%E7%8F%8D");
try {
String name=URLDecoder.decode(urlEncodeUserName,"utf-8");
System.out.println(name);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
http://shiwj1010.iteye.com/blog/383425