You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe I have found a bug for the COMBINE_UNICODE_SURROGATES_IN_UTF8 feature introduced in version 2.18. It doesn't work when custom characterEscapes is used.
It's expected that the third line (printed by utf8FactoryWithCharacterEscapes) should be the same as the second line (printed by utf8Factory), but they are different.
The reason seems to be that when custom characterEscapes is used, the code calls the two _writeCustomStringSegment2() methods, shown below, which do not check the COMBINE_UNICODE_SURROGATES_IN_UTF8 feature.
I believe the fix is easy, we can just port the changes we made in #1335 and #1360 to the two _writeCustomStringSegment2() methods. I am working on a pull request.
The text was updated successfully, but these errors were encountered:
Version: 2.18.0+
Hi!
I believe I have found a bug for the COMBINE_UNICODE_SURROGATES_IN_UTF8 feature introduced in version 2.18. It doesn't work when custom characterEscapes is used.
An example:
The output:
It's expected that the third line (printed by
utf8FactoryWithCharacterEscapes
) should be the same as the second line (printed byutf8Factory
), but they are different.The reason seems to be that when custom characterEscapes is used, the code calls the two
_writeCustomStringSegment2()
methods, shown below, which do not check theCOMBINE_UNICODE_SURROGATES_IN_UTF8
feature.jackson-core/src/main/java/com/fasterxml/jackson/core/json/UTF8JsonGenerator.java
Lines 1684 to 1739 in 9fcf1e7
I believe the fix is easy, we can just port the changes we made in #1335 and #1360 to the two
_writeCustomStringSegment2()
methods. I am working on a pull request.The text was updated successfully, but these errors were encountered: