Skip to content

Commit

Permalink
Merge pull request #34 from dmeloni-radarservices/master
Browse files Browse the repository at this point in the history
Open pattern files using UTF-8 encoding
  • Loading branch information
garyelephant authored Jul 29, 2018
2 parents 5f01eb6 + 83a6b8a commit de9e3f9
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 de9e3f9

Please sign in to comment.