diff --git a/src/org/apache/xml/serializer/ToStream.java b/src/org/apache/xml/serializer/ToStream.java index 1134eb7ee..e55e6c2d5 100644 --- a/src/org/apache/xml/serializer/ToStream.java +++ b/src/org/apache/xml/serializer/ToStream.java @@ -1594,6 +1594,11 @@ else if (ch == CharInfo.S_LINE_SEPARATOR) { writer.write("
"); lastDirtyCharProcessed = i; } + if (Character.isHighSurrogate(ch)) + { + lastDirtyCharProcessed = processDirty(chars,end, i,ch, lastDirtyCharProcessed, true); + i = lastDirtyCharProcessed; + } else if (m_encodingInfo.isInEncoding(ch)) { // If the character is in the encoding, and // not in the normal ASCII range, we also