Skip to content

Commit 72d7331

Browse files
Added encoding=utf8 to read_file_into_line_list
1 parent 5c42c64 commit 72d7331

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/file_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def read_file_into_line_list(file_path, if_strip=False):
112112
if not os.path.exists(file_path):
113113
print("File {} not exists!".format(file_path))
114114
return None
115-
with open(file_path) as f:
115+
with open(file_path, encoding="utf8") as f:
116116
content = f.readlines()
117117
if if_strip:
118118
content = [x.strip() for x in content]

0 commit comments

Comments
 (0)