/** * Computes the appropriate "Content-Type" string to be specified * as an the XHTML <tt>meta</tt> element. * * @see #computeContentTypeHeader() */ private String computeMetaContentType() { return options.getContentType() + "; charset=" + options.getEncoding(); } }
/** * Computes the appropriate "Content-Type" string to be specified * as an the XHTML <tt>meta</tt> element. * * @see #computeContentTypeHeader() */ private String computeMetaContentType() { return options.getContentType() + "; charset=" + options.getEncoding(); } }
/** * Computes the appropriate "Content-Type" string to be specified * as an the XHTML <tt>meta</tt> element. * * @see #computeContentTypeHeader() */ private String computeMetaContentType() { return options.getContentType() + "; charset=" + options.getEncoding(); } }
/** * Computes the appropriate "Content-Type" string to be specified as an HTTP Header. (Note * that MathPlayer only sniffs a limited number of Content Types.) */ private String computeContentTypeHeader() { String result; if (options.isNoCharsetInContentTypeHeader()) { result = options.getContentType(); } else { result = options.getContentType() + "; charset=" + options.getEncoding(); } return result; }
/** * Computes the appropriate "Content-Type" string to be specified as an HTTP Header. (Note * that MathPlayer only sniffs a limited number of Content Types.) */ private String computeContentTypeHeader() { String result; if (options.getWebPageType()==WebPageType.CROSS_BROWSER_XHTML) { /* MathPlayer can only handle application/xhtml+xml without a "charset" clause */ result = options.getContentType(); } else { result = options.getContentType() + "; charset=" + options.getEncoding(); } return result; }
/** * Computes the appropriate "Content-Type" string to be specified as an HTTP Header. (Note * that MathPlayer only sniffs a limited number of Content Types.) */ private String computeContentTypeHeader() { String result; if (options.getWebPageType()==WebPageType.CROSS_BROWSER_XHTML) { /* MathPlayer can only handle application/xhtml+xml without a "charset" clause */ result = options.getContentType(); } else { result = options.getContentType() + "; charset=" + options.getEncoding(); } return result; }
OutputStreamWriter doctypeWriter = new OutputStreamWriter(outputStream, options.getEncoding()); doctypeWriter.write(W3CConstants.HTML5_DOCTYPE_HEADER); doctypeWriter.flush();
if (options.isHtml5()) { meta.setAttribute("charset", options.getEncoding());