Skip to content

Commit

Permalink
Do not rely on environment to know charset of known file
Browse files Browse the repository at this point in the history
When opening the dict, we know it's in UTF-8, so do not rely on the
environment.

Thanks to Ettl Martin for reporting the problem and founding the
solution.
  • Loading branch information
lucasdemarchi committed Dec 6, 2011
1 parent 988b0f4 commit b038c2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def build_exclude_hashes(filename):
exclude_lines.add(line)

def build_dict(filename):
with open(filename, 'r') as f:
with open(filename, 'r', 1, 'utf-8') as f:
for line in f:
[key, data] = line.split('->')
data = data.strip()
Expand Down

0 comments on commit b038c2e

Please sign in to comment.