You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "jkesselm (via GitHub)" <gi...@apache.org> on 2024/02/22 20:18:25 UTC
[PR] XALANJ-2725: Fix for when UTF16 surrogate pair crosses buffer boundaries [xalan-java]
jkesselm opened a new pull request, #184:
URL: https://github.com/apache/xalan-java/pull/184
Fixes the specific buffer-crossing issue tested in the associated xalan-test branch.
As discussed in XALANJ-2725, there are still some edge conditions possible here. But it fixes one known bad case, and at least partially guards against another.
My *preferred* fix would be to have malformed UTF16 input throw exceptions rather than trying to dance around this to output (unusable) Numeric Character References for isolated surrogates, but the code is currently inconsistent about that and seems to suggest that we moved away from that for some reason... and I don't recall why we thought the fake-NCRs were a good idea.
If we stay with fake-NCRs for isolated surrogates, I'm seriously considering changing them to be fake-entity-references, which will at least not be syntactically incorrect; this could be done by replacing the current output, eg `�`, with something more like `&ERR_INVALID_UTF16_SURROGATE_55308;` , using the MsgKey string so we at least are in synch with the internationalization layer for clarity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
Re: [PR] XALANJ-2725: Fix for when UTF16 surrogate pair crosses buffer boundaries [xalan-java]
Posted by "jkesselm (via GitHub)" <gi...@apache.org>.
jkesselm merged PR #184:
URL: https://github.com/apache/xalan-java/pull/184
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org