Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix UnicodeDecodeError in diff filename #1082

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

Merged
Byron merged 1 commit into gitpython-developers:master from ishepard:UDE-diff
Nov 10, 2020

Conversation

Copy link
Contributor

@ishepard ishepard commented Nov 10, 2020
edited
Loading

Fix for #1081.

If the filename of a diff object contained non UTF-8 chars, GitPython was raising a UnicodeDecodeError.

This PR fixes this by using the "replace" flag when decoding.
Furthermore, the variable defenc is used, that is sys.getfilesystemencoding().

@Byron Byron added this to the v3.1.12 - Bugfixes milestone Nov 10, 2020
@Byron Byron merged commit bfbd5ec into gitpython-developers:master Nov 10, 2020
@Byron Byron linked an issue Nov 10, 2020 that may be closed by this pull request
Copy link
Member

Byron commented Nov 10, 2020
edited
Loading

Thanks a lot for the fix, it's much appreciated!

ishepard reacted with laugh emoji

@ishepard ishepard deleted the UDE-diff branch November 10, 2020 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Development

Successfully merging this pull request may close these issues.

UnicodeDecodeError in diff filename
2 participants

AltStyle によって変換されたページ (->オリジナル) /