Skip to content

Commit

Permalink
ci: πŸ’„ encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
melMass committed Aug 12, 2023
1 parent 2ecd470 commit 49c64c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 49c64c7

Please sign in to comment.