public String encode(String pString,String charset) throws UnsupportedEncodingException {
  if (pString == null) {
    return null;
  }
  return new String(encode(pString.getBytes(charset)),StringEncodings.US_ASCII);
}

public String encode ( String pString , String charset ) throws UnsupportedEncodingException { if ( pString == null ) { return null ; } return new String ( encode ( pString . getBytes ( charset ) ) , StringEncodings . US_ASCII ) ; }
encodes a string into its url safe form using the specified string charset . unsafe characters are escaped .
