From fb0852f5859cc07485ec0ae73b11af101e044321 Mon Sep 17 00:00:00 2001 From: Youbin Choi <41337427+Ukong0324@users.noreply.github.com> Date: Sun, 9 Jun 2024 02:09:29 +0900 Subject: [PATCH] [Bug Fix] Fix issue of loading other languages in csv file (#1225) --- embedchain/loaders/csv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embedchain/loaders/csv.py b/embedchain/loaders/csv.py index 1730ae9c..2714d575 100644 --- a/embedchain/loaders/csv.py +++ b/embedchain/loaders/csv.py @@ -27,9 +27,9 @@ class CsvLoader(BaseLoader): return StringIO(response.text) elif url.scheme == "file": path = url.path - return open(path, newline="") # Open the file using the path from the URI + return open(path, newline="", encoding="utf-8") # Open the file using the path from the URI else: - return open(content, newline="") # Treat content as a regular file path + return open(content, newline="", encoding="utf-8") # Treat content as a regular file path @staticmethod def load_data(content):