From 5e92215af7cd12d0054f563415278eade2539c95 Mon Sep 17 00:00:00 2001 From: Steffy-zxf <48793257+Steffy-zxf@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:54:16 +0800 Subject: [PATCH] fix windows locale bug (#856) --- examples/information_extraction/DuEE/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 examples/information_extraction/DuEE/utils.py diff --git a/examples/information_extraction/DuEE/utils.py b/examples/information_extraction/DuEE/utils.py old mode 100644 new mode 100755 index ca0a33c5d85d0..6fc299a281d2d --- a/examples/information_extraction/DuEE/utils.py +++ b/examples/information_extraction/DuEE/utils.py @@ -24,7 +24,7 @@ def cal_md5(str): def read_by_lines(path): """read the data by line""" result = list() - with open(path, "r") as infile: + with open(path, "r", encoding="utf8") as infile: for line in infile: result.append(line.strip()) return result