set encoding to 'utf-8' in calls to open

This commit is contained in:
thomwolf
2018-12-14 13:48:58 +01:00
parent e1eab59aac
commit ae88eb88a4
7 changed files with 13 additions and 11 deletions

View File

@@ -168,7 +168,7 @@ def read_examples(input_file):
"""Read a list of `InputExample`s from an input file."""
examples = []
unique_id = 0
with open(input_file, "r") as reader:
with open(input_file, "r", encoding='utf-8') as reader:
while True:
line = reader.readline()
if not line: