public static String decodeURIComponent(String s) {
Perl5Util util = new Perl5Util();
// Get rid of all unicode
s = util.substitute("s/%u[0-9a-fA-F]{4}//g", s);
// Adjust for JavaScript specific annoyances
s = StringUtil.replace(s, "+", "%2B");
s = StringUtil.replace(s, "%20", "+");