cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Fortuna (JIRA)" <>
Subject [jira] [Commented] (COCOON-2352) XMLEncoder doesn't support Unicode surrogate pairs
Date Thu, 15 Sep 2016 03:55:21 GMT


Ben Fortuna commented on COCOON-2352:

So I've looked at XMLEncoder, and it seems that the fix will require a change to the method
signature - specifically XMLEncoder.encode(char c):

Unfortunately this also means the Encoder interface needs to change, so will need an exercise
to identify what else implements this interface. The proposed change would be something like:

public char[] Encoder.encode(char[] chars)

I'm happy to implement a fix and submit a pull request, just looking for some acknowledgement
of the issue before proceeding.

> XMLEncoder doesn't support Unicode surrogate pairs
> --------------------------------------------------
>                 Key: COCOON-2352
>                 URL:
>             Project: Cocoon
>          Issue Type: Bug
>          Components: * Cocoon Core
>            Reporter: Ben Fortuna
> Whilst investigating an issue with the Sling project and support for emoji characters,
I've come to notice that the XMLEncoder used by HTMLSerializer doesn't support Unicode surrogate
pairs to represent higher order unicode characters.
> A simple unit test that demonstrates this issue is here:
> More background info here also: SLING-5973
> This seems to have been identified/addressed in other Apache projects also:

This message was sent by Atlassian JIRA

View raw message