code: public static String encode(String s, Type t) {
          return _encode(s, t, false, false);
      }
docs: Encodes the characters of string that are either non-ASCII characters
  or are ASCII characters that must be percent-encoded using the
  UTF-8 encoding.
  
  @param s the string to be encoded.
  @param t the URI component type identifying the ASCII characters that
  must be percent-encoded.
  @return the encoded string.