code: public static String encodeUTF8(String chars)
      {
          try
          {
              return URLEncoder.encode(chars, "UTF-8");
          }
          catch (UnsupportedEncodingException e)
          {
              throw new AssertionError(e); // thanks JDK 1.4
          }
      }
docs: URL-Encodes the given String to UTF-8 after
  form-data specifications (space {@literal ->} +)
  
  @param  chars
  The characters to encode
  
  @return The encoded String