Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.2 fix emoji #31

Closed
wants to merge 2 commits into from
Closed

V5.2 fix emoji #31

wants to merge 2 commits into from

Conversation

apatrida
Copy link
Contributor

@apatrida apatrida commented Nov 8, 2021

Surrogate pairs get mis-encoded by Jackson when it is responsible for the UTF-8 encoding. When writing (via generator or mapper) to an OutputStream this can happen. Writing to a wrapping Writer changes the responsibility to the writer and not Jackson which fixes the issue.

Added a method in the base command class to create a safe generator, then a few additional fixes in areas that were not based on that command class. A few areas are marked with TODO that are not clear if they need attention, since they call writeValueToBytes method which does the OutputStream problem internally.

See: FasterXML/jackson-core#223

…that talk to OutputStream (where Jackson does the wrong encoding), versus a Writer that wraps the OutputStream (where the writer does the correct encoding).

Some TODO remain in the code for other areas that could be affected but unlikely contain these types of characters.
@apatrida
Copy link
Contributor Author

apatrida commented Nov 8, 2021

todo for the team:

  • test coverage, there are no higher Unicode tests that have surrogates in the test suite.
  • document build/test running for this project, I cannot run the tests and it should be easy to read and do

@ml054
Copy link
Member

ml054 commented Nov 8, 2021

Hi @apatrida

Thank you for contribution.

I've created issue on our bug tracker: https://issues.hibernatingrhinos.com/issue/RDBC-503

Once we fix remaining parts + review we can merge.

@ml054 ml054 closed this Nov 8, 2021
@ml054 ml054 reopened this Nov 8, 2021
@ml054
Copy link
Member

ml054 commented Nov 8, 2021

Duplicate of #32

@ml054 ml054 marked this as a duplicate of #32 Nov 8, 2021
@ml054 ml054 closed this Nov 8, 2021
@ml054
Copy link
Member

ml054 commented Nov 9, 2021

@apatrida Fixed in 5.2.1

Thanks for contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants