code: public static String urlEncode(String value) {
  		try {
  			return URLEncoder.encode(value, StandardCharsets.UTF_8.displayName());
  		}
  		catch (UnsupportedEncodingException ex) {
  			throw new Utf8EncodingException(ex);
  		}
  	}
docs: Translates a string into {@code application/x-www-form-urlencoded}
  format using UTF-8 encoding.
  
  @param value The string value.
  @return The encoded value.
  @throws Utf8EncodingException If, for some weird reason, UTF-8 encoding is not supported.