code: public static String decode(String source, String encoding) {
  
          if (source == null) {
              return null;
          }
          if (encoding != null) {
              try {
                  return URLDecoder.decode(source, encoding);
              } catch (java.io.UnsupportedEncodingException e) {
                  // will fallback to default
              }
          }
          // fallback to default decoding
          try {
              return URLDecoder.decode(source, ENCODING_UTF_8);
          } catch (java.io.UnsupportedEncodingException e) {
              // ignore
          }
          return source;
      }
docs: This method is a substitute for <code>URLDecoder.decode()</code>.
  Use this in all OpenCms core classes to ensure the encoding is
  always handled the same way.<p>
  
  In case you don't know what encoding to use, set the value of
  the <code>encoding</code> parameter to <code>null</code>.
  This method will then default to UTF-8 encoding, which is probably the right one.<p>
  
  @param source The string to decode
  @param encoding The encoding to use (if null, the system default is used)
  
  @return The decoded source String