Skip to content

Commit b1da403

Browse files
authored
Merge pull request #2520 from JoergAtGithub/patch-1
Fix build_exclude_hashes fails: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2244: character maps to <undefined>
2 parents fd1d5c0 + 52d0a94 commit b1da403

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codespell_lib/_codespell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def parse_ignore_words_option(ignore_words_option):
460460

461461

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

0 commit comments

Comments
 (0)