From 9ad5818939ab8bdcaa69812aae0ce57c3ed7b332 Mon Sep 17 00:00:00 2001 From: Dhiraj Suvarna Date: Mon, 28 Mar 2022 20:09:18 +0530 Subject: [PATCH] added encoding format while opening of file --- backend/data_export/pipeline/writers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/data_export/pipeline/writers.py b/backend/data_export/pipeline/writers.py index aacf8904..61441d1a 100644 --- a/backend/data_export/pipeline/writers.py +++ b/backend/data_export/pipeline/writers.py @@ -35,7 +35,7 @@ class LineWriter(BaseWriter): for record in records: filename = os.path.join(self.tmpdir, f"{record.user}.{self.extension}") if filename not in files: - f = open(filename, mode="a") + f = open(filename, mode="a", encoding="utf-8") files[filename] = f f = files[filename] line = self.create_line(record)