From d8c6d0eb77a6535f2fb0032ae874a1efcdb813c2 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Tue, 23 Jul 2019 06:42:44 +0000 Subject: [PATCH] Adding encoding to `open` in`to_json` --- camelot/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camelot/core.py b/camelot/core.py index c4bd4d4..fffa262 100644 --- a/camelot/core.py +++ b/camelot/core.py @@ -599,7 +599,7 @@ class Table(object): kw = {"orient": "records"} kw.update(kwargs) json_string = self.df.to_json(**kw) - with open(path, "w") as f: + with open(path, "w", encoding="utf-8") as f: f.write(json_string) def to_excel(self, path, **kwargs):