Skip to content

Commit

Permalink
Merge pull request #2520 from JoergAtGithub/patch-1
Browse files Browse the repository at this point in the history
Fix build_exclude_hashes fails: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2244: character maps to <undefined>
  • Loading branch information
peternewman authored Oct 11, 2022
2 parents fd1d5c0 + 52d0a94 commit b1da403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def parse_ignore_words_option(ignore_words_option):


def build_exclude_hashes(filename, exclude_lines):
with codecs.open(filename, 'r') as f:
with codecs.open(filename, mode='r', encoding='utf-8') as f:
for line in f:
exclude_lines.add(line)

Expand Down

0 comments on commit b1da403

Please sign in to comment.