2
0
Nick Sweeting 4 жил өмнө
parent
commit
56c6b11b14
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      archivebox/system.py

+ 1 - 1
archivebox/system.py

@@ -37,7 +37,7 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over
     """Safe atomic write to filesystem by writing to temp file + atomic rename"""
 
     mode = 'wb+' if isinstance(contents, bytes) else 'w'
-    encoding = None if isinstance(contents, bytes) else 'utf-8'
+    encoding = None if isinstance(contents, bytes) else 'utf-8'  # enforce utf-8 on all text writes
 
     # print('\n> Atomic Write:', mode, path, len(contents), f'overwrite={overwrite}')
     try: