Skip to content

Commit efb18fe

Browse files
committed
Better handling of encoding around logo generation.
This patch fixes #264. Contributors: * @T145
1 parent ffa0452 commit efb18fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PyFunceble/cli/storage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"""
5252

5353
import os
54+
import sys
5455
from typing import Optional
5556

5657
import colorama
@@ -70,7 +71,7 @@
7071
f"https://git.io/JkUPF{colorama.Style.RESET_ALL}"
7172
)
7273

73-
if PlatformUtility.is_unix():
74+
if PlatformUtility.is_unix() and sys.stdin.encoding == "utf-8":
7475
ASCII_PYFUNCEBLE = """
7576
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
7677
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝

0 commit comments

Comments
 (0)