使用您自己的算法解码URL
/** 来自 时 代 Java - nowjava.com**/ //package com.nowjava; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.StringTokenizer; public class Main { public static String decodeURL(String s) { if (s == null) { return ""; } if (s.indexOf('+') < 0) { try { return URLDecoder.decode(s, "UTF-8"); } catch (IllegalArgumentException e) { e.printStackTrace(); return ""; /** 来自 nowjava.com - 时 代 Java**/ } catch (UnsupportedEncodingException e) { e.printStackTrace(); return ""; } } StringTokenizer st = new StringTokenizer(s, "+", true); StringBuilder sb = new StringBuilder(); while (st.hasMoreTokens()) { String tk = st.nextToken(); if ("+".equals(tk)) { sb.append("+"); } else { try { tk = URLDecoder.decode(tk, "UTF-8"); }