Closed
Description
Hi,
a branch is shown incorrectly when contains utf-8 characters
Branch name:
refs/heads/zażółć_gęślą_jaźń
The issue can be fixed by adding encoding in SymbolicReference._get_ref_info_helper.
Proposed change:
Replace
with open(osp.join(repodir, ref_path), 'rt') as fp:
Current result (e.g. shown as active_branch):
refs/heads/zażółć_gęślą_jaźń
with
with open(osp.join(repodir, ref_path), 'rt', encoding="utf-8") as fp:
Expected result:
refs/heads/zażółć_gęślą_jaźń
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
Byron commentedon Oct 28, 2019
Thanks for letting me know! Unfortunately, GitPython is full of encoding issues, and even though assuming UTF-8 isn't technically a perfect fix, it's definitely an improvement over using ASCII implicitly.
I would be happy to receive a PR for that.
Harmon758 commentedon Feb 18, 2020
Duplicate of #774