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

Handle a Thrift exception if file content contains Unicode char that escapes as \u01?? by b64ing source text #726

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

whisperity
Copy link
Contributor

@whisperity whisperity commented Jul 13, 2017

Issue appeared to @dkrupp when doing the "show bug's line in diff" for #723.

For example, in FFMpeg, some files' header contains the following line:

* Copyright (c) 2013 Clément Bœsch

œ is encoded in Unicode as \u0153, but Thrift's python client used by CodeChecker cmd only accepts \u00xy in the transmitted JSON, otherwise, an Unexpected token: 1 is thrown and the connection dies.

Solution is to introduce a new method to encode the file output (optionally) as a base64 string, which in turn can be sent over Thrift via no exceptions and decoded later on.

@whisperity whisperity added API change 📄 Content of patch changes API! bugfix 🔨 labels Jul 13, 2017
@whisperity whisperity added this to the release 5.9 milestone Jul 13, 2017
@whisperity whisperity force-pushed the unexpected_char branch 8 times, most recently from c270ef0 to f71d584 Compare July 14, 2017 13:08
Copy link
Contributor

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bruntib bruntib merged commit ebb1d03 into Ericsson:master Jul 14, 2017
@whisperity whisperity deleted the unexpected_char branch July 14, 2017 15:36
@whisperity whisperity mentioned this pull request Aug 3, 2017
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change 📄 Content of patch changes API! bugfix 🔨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants