]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fix(Py3): Open output text files in utf-8 encoding
authorOleg Broytman <phd@phdru.name>
Mon, 13 Nov 2023 14:36:01 +0000 (17:36 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 13 Nov 2023 19:02:26 +0000 (22:02 +0300)
db2bkmk.py
sort_db.py

index 07e2756cae6e547d40064458db8422d86df49f41..4e50101c6176318b377475c5704544d3595b31f0 100755 (executable)
@@ -97,7 +97,7 @@ def run():
 
         root_folder.walk_depth(Transl(transl_d))
 
-    outfile = open(output_filename, 'w')
+    outfile = open(output_filename, 'w', encoding='utf-8')
     root_folder.walk_depth(writer(outfile, prune))
     outfile.close()
 
index 143c7d1349c44be69406dc4137f3c1d88c10d23a..bcd3a8ed6aa50387ec3766ed75dc0e7af7c62c5b 100755 (executable)
@@ -99,7 +99,7 @@ def run():
         sys.stdout.write("Writing %s: " % output_filename)
         sys.stdout.flush()
 
-    outfile = open(output_filename, 'w')
+    outfile = open(output_filename, 'w', encoding='utf-8')
     writer = writer(outfile)
     writer.root_folder(root_folder)
     walk_linear(linear, writer)