/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private String getSubmitCharset() { if (getAcceptCharsetAttribute().length() > 0) { return getAcceptCharsetAttribute().trim().replaceAll("[ ,].*", ""); } return getPage().getPageEncoding(); }
/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private String getSubmitCharset() { if (getAcceptCharsetAttribute().length() > 0) { return getAcceptCharsetAttribute().trim().replaceAll("[ ,].*", ""); } return getPage().getPageEncoding(); }
/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private String getSubmitCharset() { if (getAcceptCharsetAttribute().length() > 0) { return getAcceptCharsetAttribute().trim().replaceAll("[ ,].*", ""); } return getPage().getPageEncoding(); }
/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private Charset getSubmitCharset() { String charset = getAcceptCharsetAttribute(); if (!charset.isEmpty()) { charset = charset.trim(); return EncodingSniffer.toCharset( SUBMIT_CHARSET_PATTERN.matcher(charset).replaceAll("").toUpperCase(Locale.ROOT)); } return getPage().getCharset(); }
/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private Charset getSubmitCharset() { String charset = getAcceptCharsetAttribute(); if (!charset.isEmpty()) { charset = charset.trim(); return EncodingSniffer.toCharset( SUBMIT_CHARSET_PATTERN.matcher(charset).replaceAll("").toUpperCase(Locale.ROOT)); } return getPage().getCharset(); }