code: public static String encodeUserInfo(String userInfo, String encoding) throws UnsupportedEncodingException {
  		return HierarchicalUriComponents.encodeUriComponent(userInfo, encoding, HierarchicalUriComponents.Type.USER_INFO);
  	}
docs: Encodes the given URI user info with the given encoding.
  @param userInfo the user info to be encoded
  @param encoding the character encoding to encode to
  @return the encoded user info
  @throws UnsupportedEncodingException when the given encoding parameter is not supported