Skip to content

Commit

Permalink
XALANJ-2617 Fix missing surrogate pairs support
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kec <[email protected]>
  • Loading branch information
danielkec committed May 28, 2018
1 parent cba6d7f commit 88d3d37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/org/apache/xml/serializer/ToStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,11 @@ else if (ch == CharInfo.S_LINE_SEPARATOR) {
writer.write("&#8232;");
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
Expand Down

0 comments on commit 88d3d37

Please sign in to comment.