From 49c64c74eb3e99f456b563bbd79e3fe47a85c70d Mon Sep 17 00:00:00 2001 From: melMass Date: Sun, 13 Aug 2023 00:15:12 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=92=84=20encoding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.py b/install.py index d2e8744..247fdcd 100644 --- a/install.py +++ b/install.py @@ -116,8 +116,12 @@ def print_formatted(text, *formats, color=None, background=None, **kwargs): header = "[mtb install] " # Handle console encoding for Unicode characters (utf-8) - encoded_header = header.encode("utf-8", errors="replace").decode("utf-8") - encoded_text = formatted_text.encode("utf-8", errors="replace").decode("utf-8") + encoded_header = header.encode(sys.stdout.encoding, errors="replace").decode( + sys.stdout.encoding + ) + encoded_text = formatted_text.encode(sys.stdout.encoding, errors="replace").decode( + sys.stdout.encoding + ) print( " " * len(encoded_header)