From cb415f8ae9f1a202d9d3e6b3aaf356c584d4e140 Mon Sep 17 00:00:00 2001 From: Hesam Damghanian <32716448+Sk7w4tch3r@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:10:29 +0430 Subject: [PATCH] Support for utf-8 characters Default encoding differs across platforms (i.e. cp1252 in windows) which causes unexpected behaviours with certain character sets. It is suggested to specify the encoding type directly. --- mindmeld/resource_loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindmeld/resource_loader.py b/mindmeld/resource_loader.py index 5d38bc9bc..1603a3422 100644 --- a/mindmeld/resource_loader.py +++ b/mindmeld/resource_loader.py @@ -440,7 +440,7 @@ def load_entity_map(self, entity_type): json_data = {} else: try: - with open(file_path, "r") as json_file: + with open(file_path, "r", encoding='utf-8') as json_file: json_data = json.load(json_file) except json.JSONDecodeError as e: raise MindMeldError(