Add UTF-8 encoding to output file handling (#36)

This commit is contained in:
David Jarman
2025-02-13 19:12:37 -08:00
committed by GitHub
parent bc05005e3b
commit 645cf7ae2f

View File

@@ -210,7 +210,7 @@ def cli(
writer = click.echo
fp = None
if output_file:
fp = open(output_file, "w")
fp = open(output_file, "w", encoding='utf-8')
writer = lambda s: print(s, file=fp)
for path in paths:
if not os.path.exists(path):