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

Add encoding to utf-8 for fetch_info_lines, for fetch_head_info; #1325

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:main from f100024:fix-encoding
Aug 24, 2021
Merged

Add encoding to utf-8 for fetch_info_lines, for fetch_head_info; #1325

Byron merged 1 commit into gitpython-developers:main from f100024:fix-encoding
Aug 24, 2021

Conversation

Copy link

@f100024 f100024 commented Aug 23, 2021

Fix encoding error:

UnicodeEncodeError: 'charmap' codec can't encode characters in position 39230-39231: character maps to <undefined>

Add encoding to utf-8 for fetch_head_info;
@Byron Byron added this to the v3.1.21 - Bugfixes milestone Aug 24, 2021
@Byron Byron merged commit ef1ef4d into gitpython-developers:main Aug 24, 2021
Copy link
Member

Byron commented Aug 24, 2021

Thanks a lot for the fix.

In theory the encoding of fetch_info_lines is undefined, so it's strange that converting them into a str() works as this requires a known encoding. Especially for printing I think it's sufficient to encode with replacement instead of failure in case of encoding errors.

f100024 reacted with thumbs up emoji

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.

2 participants

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