From 169a0250aaed080d330618e4dd1c027a74fe9a2b Mon Sep 17 00:00:00 2001 From: Nodir Malikov Date: Fri, 21 Jan 2022 11:14:50 +0500 Subject: [PATCH] Set UTF-8 Encoding --- pickledb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pickledb.py b/pickledb.py index 160b0d5..c0dce21 100644 --- a/pickledb.py +++ b/pickledb.py @@ -100,7 +100,7 @@ def dump(self): def _loaddb(self): '''Load or reload the json info from the file''' try: - self.db = json.load(open(self.loco, 'rt')) + self.db = json.load(open(self.loco, 'rt', encoding='utf-8')) except ValueError: if os.stat(self.loco).st_size == 0: # Error raised because file is empty self.db = {}