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

Detect encoding problems #108

Merged
merged 15 commits into from
Jul 5, 2023

Conversation

ben-Draeger
Copy link
Collaborator

@ben-Draeger ben-Draeger commented Jun 14, 2023

SDCcc currently accepts the encoding specified in a message and uses it to decode the message. When the encoding is specified incorrectly or the message contains characters that are not mappable using the specified encoding, then they are replaced by Charset-specific default characters, which may lead to False-positives or False-negatives in Test Cases that rely on messages stored in the database.

A much better approach would be to check the encoding while decoding the messages and to raise an Encoding Error when decoding a message with the specified encoding fails. As usual, these Encoding Errors can be managed using the EnableMessageEncodingCheck and SummarizeMessageEncodingErrors configuration options.

Checklist

The following aspects have been respected by the author of this pull request, confirmed by both pull request assignee and reviewer:

  • Adherence to coding conventions
    • Pull Request Assignee
    • Reviewer
  • Adherence to javadoc conventions
    • Pull Request Assignee
    • Reviewer
  • Changelog update (necessity checked and entry added or not added respectively)
    • Pull Request Assignee
    • Reviewer
  • README update (necessity checked and entry added or not added respectively)
    • Pull Request Assignee
    • Reviewer
  • config update (necessity checked and entry added or not added respectively)
    • Pull Request Assignee
    • Reviewer
  • SDCcc executable ran against a test device (if necessary)
    • Pull Request Assignee
    • Reviewer

@ben-Draeger ben-Draeger added the enhancement New feature or request label Jun 14, 2023
@ben-Draeger ben-Draeger self-assigned this Jun 14, 2023
@maximilianpilz maximilianpilz merged commit 9d17cf9 into Draegerwerk:main Jul 5, 2023
2 checks passed
@ben-Draeger ben-Draeger deleted the detect_encoding_problems branch July 6, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants