code: public static String decode(final String aURL, final String aEncoding) {
          String urlString = aURL;
          String decodedString;
  
          try {
              do {
                  decodedString = urlString;
  
                  // Java's URLDecoder needs a little help with occurrences of '%' that aren't percent escaped values
                  urlString = URLDecoder.decode(decodedString.replaceAll("%(?![0-9a-fA-F]{2})", PERCENT), aEncoding);
              } while (!urlString.equals(decodedString));
          } catch (final java.io.UnsupportedEncodingException details) {
              throw new UnsupportedEncodingException(details, aEncoding);
          }
  
          if (LOGGER.isDebugEnabled() && !aURL.equals(decodedString)) {
              LOGGER.debug(MessageCodes.DBG_002, aURL, decodedString);
          }
  
          return decodedString;
      }
docs: Decodes an encoded path. If it has been doubly encoded, it is doubly decoded.
  
  @param aURL An encoded URL String
  @param aEncoding A character encoding to use for the string decoding
  @return A decoded URL String