From 31e8c7f8c3a181f05780aa5d20575b6dc45c1379 Mon Sep 17 00:00:00 2001 From: George Lee <34227118+cgeorgelee@users.noreply.github.com> Date: Wed, 25 May 2022 20:29:00 -0700 Subject: [PATCH] Specify utf-8 as the encoding for currencies.json --- forex_python/converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forex_python/converter.py b/forex_python/converter.py index 390a11a..5f7f3a8 100644 --- a/forex_python/converter.py +++ b/forex_python/converter.py @@ -124,7 +124,7 @@ def __init__(self): def _currency_data(self): if self.__currency_data is None: file_path = os.path.dirname(os.path.abspath(__file__)) - with open(file_path + '/raw_data/currencies.json') as f: + with open(file_path + '/raw_data/currencies.json', encoding='utf-8') as f: self.__currency_data = json.loads(f.read()) return self.__currency_data