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

fix: Replace non ascii characters with question marks #3464

Merged
merged 0 commits into from
Jul 13, 2022
Merged

fix: Replace non ascii characters with question marks #3464

merged 0 commits into from
Jul 13, 2022

Conversation

ryan-blakley
Copy link
Contributor

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

Iniparser is only setup to parse string.printable characters. This doesn't include non ascii characters from various languages, which causes an exception when they're in a config file. So replace the characters with question marks.

Fixes #3450

@ryan-blakley ryan-blakley changed the title fix: Replace non ascii characters with question marks WIP: fix: Replace non ascii characters with question marks Jul 11, 2022
@ryan-blakley ryan-blakley changed the title WIP: fix: Replace non ascii characters with question marks fix: Replace non ascii characters with question marks Jul 12, 2022
@ryan-blakley
Copy link
Contributor Author

@xiangce when you get a chance if you could review this PR.

Copy link
Contributor

@xiangce xiangce left a comment

Choose a reason for hiding this comment

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

It looks good to me. Thanks @ryan-blakley

@xiangce xiangce merged commit 1fe7320 into RedHatInsights:master Jul 13, 2022
xiangce pushed a commit that referenced this pull request Jul 13, 2022
* Iniparser is only setup to parse string.printable characters. This
  doesn't include non ascii characters from various languages, which
  causes an exception when they're in a config file. So replace the
  characters with question marks.
* Fixes #3450

Signed-off-by: Ryan Blakley <[email protected]>
(cherry picked from commit 1fe7320)
@ryan-blakley ryan-blakley deleted the issue_3450 branch October 21, 2022 14:00
xiangce pushed a commit that referenced this pull request Sep 6, 2024
* Iniparser is only setup to parse string.printable characters. This
  doesn't include non ascii characters from various languages, which
  causes an exception when they're in a config file. So replace the
  characters with question marks.
* Fixes #3450

Signed-off-by: Ryan Blakley <[email protected]>
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.

The parser IniConfigFile runs into exceptions when the ini file contains Chinese or Japanese strings
2 participants