From 840008d8cd7cb5f180773f159ba6e5d21de387c5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 9 Jul 2023 13:23:21 -0700 Subject: [PATCH] Specify text encoding for zero-fill map file --- scripts/wk/clone/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wk/clone/ddrescue.py b/scripts/wk/clone/ddrescue.py index 69c66cb0..bb0d4f5b 100644 --- a/scripts/wk/clone/ddrescue.py +++ b/scripts/wk/clone/ddrescue.py @@ -2242,7 +2242,7 @@ def zero_fill_destination(state: State, dry_run: bool = True) -> None: ) io.copy_file(block_pair.map_path, zero_map_path, overwrite=True) if larger_destination: - with open(zero_map_path, 'a') as f: + with open(zero_map_path, 'a', encoding='utf-8') as f: f.write( f'{hex(block_pair.size)} ' f'{hex(destination_size - block_pair.size)} ?'