File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333def 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
Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments