/** * Initializes a decoder from external decl. */ protected Encoding encodingFromExternalDeclaration(String encoding) throws SAXException { if (encoding == null) { return null; } encoding = Encoding.toAsciiLowerCase(encoding); try { Encoding cs = Encoding.forName(encoding); if ("utf-16".equals(cs.getCanonName()) || "utf-32".equals(cs.getCanonName())) { swallowBom = false; } return whineAboutEncodingAndReturnActual(encoding, cs); } catch (UnsupportedCharsetException e) { tokenizer.err("Unsupported character encoding name: \u201C" + encoding + "\u201D. Will sniff."); swallowBom = true; } return null; // keep the compiler happy }
/** * Initializes a decoder from external decl. */ protected Encoding encodingFromExternalDeclaration(String encoding) throws SAXException { if (encoding == null) { return null; } encoding = Encoding.toAsciiLowerCase(encoding); try { Encoding cs = Encoding.forName(encoding); if ("utf-16".equals(cs.getCanonName()) || "utf-32".equals(cs.getCanonName())) { swallowBom = false; } return whineAboutEncodingAndReturnActual(encoding, cs); } catch (UnsupportedCharsetException e) { tokenizer.err("Unsupported character encoding name: \u201C" + encoding + "\u201D. Will sniff."); swallowBom = true; } return null; // keep the compiler happy }
/** * Initializes a decoder from external decl. */ protected Encoding encodingFromExternalDeclaration(String encoding) throws SAXException { if (encoding == null) { return null; } encoding = Encoding.toAsciiLowerCase(encoding); try { Encoding cs = Encoding.forName(encoding); if ("utf-16".equals(cs.getCanonName()) || "utf-32".equals(cs.getCanonName())) { swallowBom = false; } return whineAboutEncodingAndReturnActual(encoding, cs); } catch (UnsupportedCharsetException e) { tokenizer.err("Unsupported character encoding name: \u201C" + encoding + "\u201D. Will sniff."); swallowBom = true; } return null; // keep the compiler happy }
characterEncoding = Encoding.toAsciiLowerCase(actualName); encoding = Encoding.toAsciiLowerCase(encoding); try { Encoding cs = Encoding.forName(encoding);
protected boolean tryCharset(String encoding) throws SAXException { encoding = Encoding.toAsciiLowerCase(encoding); try {
protected boolean tryCharset(String encoding) throws SAXException { encoding = Encoding.toAsciiLowerCase(encoding); try {
protected boolean tryCharset(String encoding) throws SAXException { encoding = Encoding.toAsciiLowerCase(encoding); try {
public boolean internalEncodingDeclaration(String internalCharset) throws SAXException { try { internalCharset = Encoding.toAsciiLowerCase(internalCharset); Encoding cs; if ("utf-16".equals(internalCharset)
public boolean internalEncodingDeclaration(String internalCharset) throws SAXException { try { internalCharset = Encoding.toAsciiLowerCase(internalCharset); Encoding cs; if ("utf-16".equals(internalCharset)
public boolean internalEncodingDeclaration(String internalCharset) throws SAXException { try { internalCharset = Encoding.toAsciiLowerCase(internalCharset); Encoding cs; if ("utf-16".equals(internalCharset)