Skip to content

Commit

Permalink
Open pattern files using UTF-8 encoding
Browse files Browse the repository at this point in the history
Closes #33
  • Loading branch information
Dario Meloni committed Jul 26, 2018
1 parent 5f01eb6 commit 83a6b8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygrok/pygrok.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
except ImportError as e:
# If you import re, grok_match can't handle regular expression containing atomic group(?>)
import re
import codecs
import os
import pkg_resources

Expand Down Expand Up @@ -105,7 +106,7 @@ def _load_patterns_from_file(file):
"""
"""
patterns = {}
with open(file, 'r') as f:
with codecs.open(file, 'r', encoding='utf-8') as f:
for l in f:
l = l.strip()
if l == '' or l.startswith('#'):
Expand Down
Empty file modified setup.py
100644 → 100755
Empty file.

0 comments on commit 83a6b8a

Please sign in to comment.