1414def get_vaults ():
1515 vaults = []
1616 try :
17- with open (VAULTS_PATH , 'r' ) as f :
17+ with open (VAULTS_PATH , 'r' , encoding = 'utf-8' ) as f :
1818 data = json .load (f )
1919 except FileNotFoundError :
2020 logger .error (f'{ VAULTS_PATH } not found!\n Is obsidian installed?' )
@@ -26,7 +26,7 @@ def get_vaults():
2626
2727def get_vault (id ):
2828 try :
29- with open (VAULTS_PATH , 'r' ) as f :
29+ with open (VAULTS_PATH , 'r' , encoding = 'utf-8' ) as f :
3030 data = json .load (f )
3131 except FileNotFoundError :
3232 logger .error (f'{ VAULTS_PATH } not found!\n Is obsidian installed?' )
@@ -82,7 +82,7 @@ def open_note(self):
8282 open_note (self .vault .name , self .relative_path )
8383
8484 def content (self ):
85- with open (self .path , 'r' ) as f :
85+ with open (self .path , 'r' , encoding = 'utf-8' ) as f :
8686 return f .read ()
8787
8888
@@ -96,7 +96,7 @@ def toggle_checkbox(self, raw):
9696 toggled_line = line .replace (CHECK_BOX , MARKED_CHECK_BOX )
9797 break
9898 content = content .replace (line , toggled_line )
99- with open (self .path , 'w' ) as f :
99+ with open (self .path , 'w' , encoding = 'utf-8' ) as f :
100100 f .write (content )
101101
102102 def checklists (self ):
0 commit comments