code: public static String encode(String str)
  	{
  		try
  		{
  			return java.net.URLEncoder.encode(str, "UTF-8");
  		}
  		catch(java.io.UnsupportedEncodingException ue)
  		{
  			return str;
  		}
  	}
docs: encodes the given string using URLEncoder.
  @param str String that is to be encoded.
  @return  encoded string.