From 46395e28bcfada06c8a7bd96edf7a705997aea87 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Wed, 18 May 2022 10:31:19 -0500 Subject: [PATCH] fix(windows): fixed windows output. colorama was converting to cp1252 --- src/djlint/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/djlint/__init__.py b/src/djlint/__init__.py index 8c27808..4a5abcc 100644 --- a/src/djlint/__init__.py +++ b/src/djlint/__init__.py @@ -228,7 +228,8 @@ def main( if temp_file and (config.reformat or config.check): # if using stdin, only give back formatted code. - echo(Path(temp_file.name).read_text(encoding="utf8").rstrip()) + echo(Path(temp_file.name).read_text(encoding="utf8").rstrip().encode('utf8')) + if temp_file: temp_file.close()