Skip to content

Commit

Permalink
Fix utf-8 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Ding committed Nov 21, 2017
1 parent b30e41d commit 35ddf50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thriftpy/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def parse(path, module_name=None, include_dirs=None, include_dir=None,
with open(urlparse(path).netloc + urlparse(path).path) as fh:
data = fh.read()
elif url_scheme == '':
with open(path) as fh:
with open(path, encoding='utf-8') as fh:
data = fh.read()
elif url_scheme in ('http', 'https'):
data = urlopen(path).read()
Expand Down

0 comments on commit 35ddf50

Please sign in to comment.