|| encoding.equalsIgnoreCase("UTF8")) ? DEFAULT_MIME_ENCODING : convertJava2MimeEncoding(encoding); encoding = convertJava2MimeEncoding(encoding);
String newEncoding = val; if (OutputKeys.ENCODING.equals(name)) { String possible_encoding = Encodings.getMimeEncoding(val); if (possible_encoding != null) { EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding); if (newEncoding != null && encodingInfo.name == null) { encodingInfo = Encodings.getEncodingInfo(newEncoding);
if (!Encodings.isLowUTF16Surrogate(low)) { throw new IOException( Utils.messages.createMessage( codePoint = Encodings.toCodePoint(high, low);
if (Encodings.isHighUTF16Surrogate(ch)) if (!(Encodings.isLowUTF16Surrogate(next))) throw new IOException( Utils.messages.createMessage( codePoint = Encodings.toCodePoint(ch,next);
/** * Try the best we can to convert a Java encoding to a XML-style encoding. * <p> * This is not a public API. * @param encoding non-null reference to encoding string, java style. * * @return ISO-style encoding string. * @xsl.usage internal */ private static String convertJava2MimeEncoding(String encoding) { EncodingInfo enc = (EncodingInfo) _encodingTableKeyJava.get(toUpperCaseFast(encoding)); if (null != enc) return enc.name; return encoding; }
if (getOmitXMLDeclaration() == false) String encoding = Encodings.getMimeEncoding(getEncoding()); String standalone;
int len = lengthOfMimeNames(val);
if (!Encodings.isRecognizedEncoding(fEncoding)) { String msg = Utils.messages .createMessage(
public boolean isInEncoding(char ch1) { final boolean ret; int codePoint = Encodings.toCodePoint(ch1); if (codePoint < m_explFirst) {
writer.write(c); } else if (Encodings.isHighUTF16Surrogate(c)) { final int codePoint = writeUTF16Surrogate(c, ch, i, end); if (codePoint != 0) {
if (!Encodings.isLowUTF16Surrogate(low)) { throw new IOException( Utils.messages.createMessage( codePoint = Encodings.toCodePoint(high, low);
if (Encodings.isHighUTF16Surrogate(ch)) if (!(Encodings.isLowUTF16Surrogate(next))) throw new IOException( Utils.messages.createMessage( codePoint = Encodings.toCodePoint(ch,next);
/** * Returns the EncodingInfo object for the specified * encoding, never null, although the encoding name * inside the returned EncodingInfo object will be if * we can't find a "real" EncodingInfo for the encoding. * <p> * This is not a public API. * * @param encoding The encoding * @return The object that is used to determine if * characters are in the given encoding. * @xsl.usage internal */ static EncodingInfo getEncodingInfo(String encoding) { EncodingInfo ei; String normalizedEncoding = toUpperCaseFast(encoding); ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding); if (ei == null) ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding); if (ei == null) { // We shouldn't have to do this, but just in case. ei = new EncodingInfo(null,null, '\u0000'); } return ei; }
== m_text_properties.getProperty(OutputKeys.ENCODING)) String mimeEncoding = Encodings.getMimeEncoding(null); m_text_properties.put( OutputKeys.ENCODING,
int len = lengthOfMimeNames(val);
if (!Encodings.isRecognizedEncoding(fEncoding)) { String msg = Utils.messages .createMessage(
public boolean isInEncoding(char high, char low) { final boolean ret; int codePoint = Encodings.toCodePoint(high,low); if (codePoint < m_explFirst) {
if (Encodings.isHighUTF16Surrogate(c)) else if (Encodings.isHighUTF16Surrogate(c))
String newEncoding = val; if (OutputKeys.ENCODING.equals(name)) { String possible_encoding = Encodings.getMimeEncoding(val); if (possible_encoding != null) { EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding); if (newEncoding != null && encodingInfo.name == null) { encodingInfo = Encodings.getEncodingInfo(newEncoding);