Skip to content

Commit 670b405

Browse files
committed
specify encoding
1 parent e0b7cba commit 670b405

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
def get_setting(setting_type, setting_name=None):
3434
json_path = os.path.join(dirs["config"], "user_settings.json")
3535
if os.path.exists(json_path):
36-
with open(json_path, "r") as f:
36+
with open(json_path, "r", encoding='utf-8') as f:
3737
user_settings = json.loads(f.read())
3838
else:
3939
user_settings = default_user_settings

gui/dialogs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,12 @@ def saveChanges(self):
497497
# Store newly edited paths.
498498
json_path = os.path.join(dirs["config"], "user_settings.json")
499499
if os.path.exists(json_path):
500-
with open(json_path, "r") as f:
500+
with open(json_path, "r", encoding='utf-8') as f:
501501
user_settings = json.loads(f.read())
502502
else:
503503
user_settings = {}
504504
user_settings.update(user_setting_dict_new)
505-
with open(json_path, "w") as f:
505+
with open(json_path, "w", encoding='utf-8') as f:
506506
f.write(json.dumps(user_settings, indent=4))
507507
self.parent().data_dir_changed = True
508508
self.parent().task_directory = get_setting("folders","tasks")

0 commit comments

Comments
 (0)