Skip to content

Commit 673ce45

Browse files
committed
Fix encoding issue.
This patch fixes #267. Indeed, before this patch we didn't considered that the `♥` char (among others) will be an issue to some. Contributors: * @T145
1 parent 61938d0 commit 673ce45

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

PyFunceble/cli/storage.py

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@
6161
from PyFunceble.helpers.merge import Merge
6262
from PyFunceble.utils.platform import PlatformUtility
6363

64-
STD_EPILOG: str = (
65-
f"Crafted with {colorama.Fore.RED}{colorama.Fore.RESET} by "
66-
f"{colorama.Style.BRIGHT}{colorama.Fore.CYAN}Nissar Chababy (@funilrys)"
67-
f"{colorama.Style.RESET_ALL} "
68-
f"with the help of\n{colorama.Style.BRIGHT}{colorama.Fore.GREEN}"
69-
f"https://git.io/JkUPS{colorama.Style.RESET_ALL} "
70-
f"&& {colorama.Style.BRIGHT}{colorama.Fore.GREEN}"
71-
f"https://git.io/JkUPF{colorama.Style.RESET_ALL}"
72-
)
73-
7464
if PlatformUtility.is_unix() and sys.stdin.encoding == "utf-8":
65+
STD_EPILOG: str = (
66+
f"Crafted with {colorama.Fore.RED}{colorama.Fore.RESET} by "
67+
f"{colorama.Style.BRIGHT}{colorama.Fore.CYAN}Nissar Chababy (@funilrys)"
68+
f"{colorama.Style.RESET_ALL} "
69+
f"with the help of\n{colorama.Style.BRIGHT}{colorama.Fore.GREEN}"
70+
f"https://git.io/JkUPS{colorama.Style.RESET_ALL} "
71+
f"&& {colorama.Style.BRIGHT}{colorama.Fore.GREEN}"
72+
f"https://git.io/JkUPF{colorama.Style.RESET_ALL}"
73+
)
74+
7575
ASCII_PYFUNCEBLE = """
7676
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
7777
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
@@ -80,7 +80,18 @@
8080
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
8181
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
8282
"""
83+
DONE: str = f"{colorama.Fore.GREEN}✔"
84+
ERROR: str = f"{colorama.Fore.RED}✘"
8385
else:
86+
STD_EPILOG: str = (
87+
f"Crafted with {colorama.Fore.RED}HEART{colorama.Fore.RESET} by "
88+
f"{colorama.Style.BRIGHT}{colorama.Fore.CYAN}Nissar Chababy (@funilrys)"
89+
f"{colorama.Style.RESET_ALL} "
90+
f"with the help of\n{colorama.Style.BRIGHT}{colorama.Fore.GREEN}"
91+
f"https://git.io/JkUPS{colorama.Style.RESET_ALL} "
92+
f"&& {colorama.Style.BRIGHT}{colorama.Fore.GREEN}"
93+
f"https://git.io/JkUPF{colorama.Style.RESET_ALL}"
94+
)
8495
ASCII_PYFUNCEBLE = """
8596
######## ## ## ######## ## ## ## ## ###### ######## ######## ## ########
8697
## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ##
@@ -90,9 +101,8 @@
90101
## ## ## ## ## ## ### ## ## ## ## ## ## ##
91102
## ## ## ####### ## ## ###### ######## ######## ######## ########
92103
"""
93-
94-
DONE: str = f"{colorama.Fore.GREEN}✔"
95-
ERROR: str = f"{colorama.Fore.RED}✘"
104+
DONE: str = f"{colorama.Fore.GREEN}DONE"
105+
ERROR: str = f"{colorama.Fore.RED}ERROR"
96106

97107
VERSION_DUMP_LINK: str = (
98108
"https://raw.githubusercontent.com/funilrys/PyFunceble/dev/version.yaml"

0 commit comments

Comments
 (0)