code: public String convertToEncoding(String subject, String encoding) 
          throws UnsupportedEncodingException {
          
          return new String(subject.getBytes(encoding), encoding);
      }
docs: Convert the given string to the given encoding.
  
  @param subject The value to convert
  @param encoding The name of the encoding/character set
  
  @return A new string in the given encoding
  
  @throws UnsupportedEncodingException if the encoding is invalid