@@ -44,15 +44,15 @@ def yaml_load(file):
4444 """
4545 Load single-document YAML and return document
4646 """
47- with open (file , "r" ) as f :
47+ with open (file , "r" , encoding = "utf-8" ) as f :
4848 return yaml .safe_load (f )
4949
5050
5151def yaml_load_all (file ):
5252 """
5353 Load multi-document YAML and return documents in list
5454 """
55- with open (file , "r" ) as f :
55+ with open (file , "r" , encoding = "utf-8" ) as f :
5656 return list (yaml .safe_load_all (f ))
5757
5858
@@ -78,7 +78,7 @@ def yaml_dump(obj, file):
7878 Dump obj as single-document YAML
7979 """
8080 yaml .add_representer (str , _represent_str )
81- with open (file , "w" ) as outf :
81+ with open (file , "w" , encoding = "utf-8" ) as outf :
8282 yaml .dump (obj , outf )
8383
8484
@@ -87,7 +87,7 @@ def yaml_dump_all(obj, file):
8787 Dump obj as multi-document YAML
8888 """
8989 yaml .add_representer (str , _represent_str )
90- with open (file , "w" ) as outf :
90+ with open (file , "w" , encoding = "utf-8" ) as outf :
9191 yaml .dump_all (obj , outf )
9292
9393
0 commit comments