code: public void setCharset(String to) {
      // Validate the character set.
      try {
        new String(new byte[97], to);
      } catch (UnsupportedEncodingException e) {
        throw new RuntimeException(e);
      }
      charset = to;
    }
docs: Set the character set for string value transcoding (defaults to UTF-8).