Skip to content

Commit

Permalink
allow utf-8 decoding to insert placeholder when non-utf-8 (e.g., lati…
Browse files Browse the repository at this point in the history
…n1) char detected
  • Loading branch information
paciorek committed Jan 10, 2024
1 parent 87a4dc3 commit 38fe519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 38fe519

Please sign in to comment.