Skip to content

Commit 8436c84

Browse files
authored
Update beta_code.py
Modify the part of the beta_code.py file that opens the JSON files, explicitly specifying their encoding ( utf-8).
1 parent 0dd737a commit 8436c84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beta_code/beta_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import re
66
import unicodedata
77

8-
with open(os.path.join(os.path.dirname(__file__), 'vendor/beta-code-json/beta_code_to_unicode.json')) as json_file:
8+
with open(os.path.join(os.path.dirname(__file__), 'vendor/beta-code-json/beta_code_to_unicode.json'), encoding='utf-8') as json_file:
99
BETA_CODE_TO_UNICODE_MAP = json.load(json_file)
1010

11-
with open(os.path.join(os.path.dirname(__file__), 'vendor/beta-code-json/unicode_to_beta_code.json')) as json_file:
11+
with open(os.path.join(os.path.dirname(__file__), 'vendor/beta-code-json/unicode_to_beta_code.json'), encoding='utf-8') as json_file:
1212
UNICODE_TO_BETA_CODE_MAP = json.load(json_file)
1313

1414
def greek_to_beta_code(greek, custom_map=None):

0 commit comments

Comments
 (0)