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

ISO-8859-1 fallback for reason decoding #3554

Merged
merged 2 commits into from Sep 5, 2016

Conversation

nateprewitt
Copy link
Member

This implements the proposed solution to #3538 by falling back from Unicode to ISO-8859-1 for raw reason decoding.

This is a relatively trivial fix, and I wasn't sure if you wanted to waste bandwidth fixing, @mitsuhiko. I had a brief chat with @Lukasa who said to toss this up, but I'll gladly drop it in favor of #3538, if you had plans to update.

try:
reason = self.reason.decode('utf-8')
except UnicodeDecodeError:
reason = self.reason.decode('iso-8859-1')
Copy link
Member

Choose a reason for hiding this comment

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

Can we add comments to the start of this block explaining why we're doing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep! Comment added.

@Lukasa
Copy link
Member

Lukasa commented Sep 5, 2016

@sigmavirus24 are you happy with this?

@sigmavirus24 sigmavirus24 merged commit 87f9693 into psf:master Sep 5, 2016
@sigmavirus24
Copy link
Contributor

Yep!

@nateprewitt nateprewitt deleted the 3538_fallback_to_ISO_8591_1 branch September 5, 2016 23:51
@nateprewitt nateprewitt restored the 3538_fallback_to_ISO_8591_1 branch November 3, 2016 22:13
@nateprewitt nateprewitt deleted the 3538_fallback_to_ISO_8591_1 branch November 3, 2016 22:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants