Skip to content

Commit

Permalink
Ignore encoding errors in getTeXRoot
Browse files Browse the repository at this point in the history
Related to SublimeText#635
  • Loading branch information
ig0774 committed Jan 4, 2016
1 parent c55a5b2 commit 8a36973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions getTeXRoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_tex_root(view):
else:
# This works on ST2 and ST3, but does not automatically convert line endings.
# We should be OK though.
lines = codecs.open(texFile, "r", "UTF-8")
lines = codecs.open(texFile, "r", "UTF-8", "ignore")
is_file = True

for line in lines:
Expand All @@ -74,4 +74,4 @@ def get_tex_root(view):
if is_file: # Not very Pythonic, but works...
lines.close()

return root
return root

0 comments on commit 8a36973

Please sign in to comment.