set encoding to 'utf-8' in calls to open
This commit is contained in:
@@ -227,7 +227,7 @@ def read_set_from_file(filename: str) -> Set[str]:
|
||||
Expected file format is one item per line.
|
||||
'''
|
||||
collection = set()
|
||||
with open(filename, 'r') as file_:
|
||||
with open(filename, 'r', encoding='utf-8') as file_:
|
||||
for line in file_:
|
||||
collection.add(line.rstrip())
|
||||
return collection
|
||||
|
||||
Reference in New Issue
Block a user