public String convertToEncoding ( String subject , String encoding ) throws UnsupportedEncodingException { return new String ( subject . getBytes ( encoding ) , encoding ) ; }
Convert the given string to the given encoding .