From 38fe51966bce4e2e6b9b8d847e671ad3e85c3f58 Mon Sep 17 00:00:00 2001 From: Christopher Paciorek Date: Wed, 10 Jan 2024 12:42:43 -0800 Subject: [PATCH] allow utf-8 decoding to insert placeholder when non-utf-8 (e.g., latin1) char detected --- sq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sq.py b/sq.py index 2348e7f..f41b1de 100644 --- a/sq.py +++ b/sq.py @@ -16,7 +16,7 @@ async def inner(): proc = await asyncio.create_subprocess_shell( shlex.join(cmd), stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stdout, stderr = await proc.communicate() - return stdout.decode('utf-8') + return stdout.decode('utf-8', 'backslashreplace') return asyncio.run(inner()) def freeze(dest_dir, name, data):