Skip to content

Commit

Permalink
Change file opening to replace characters on UTF-8 decode errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CraigKelly authored and suchow committed Jul 13, 2016
1 parent 20a2ef6 commit 7303dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proselint/command_line.py
Expand Up @@ -112,7 +112,7 @@ def proselint(paths=None, version=None, clean=None, debug=None,
num_errors = 0
for fp in filepaths:
try:
f = click.open_file(fp, 'r', encoding="utf-8")
f = click.open_file(fp, 'r', encoding="utf-8", errors="replace")
errors = lint(f, debug=debug)
num_errors += len(errors)
print_errors(fp, errors, output_json, compact=compact)
Expand Down

0 comments on commit 7303dc1

Please sign in to comment.