From 33fd55e6adcd1b4967fddb246d90d1b40f6a0301 Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 22 May 2024 13:39:42 -0700 Subject: [PATCH] Support unicode ascii art on Windows Windows Terminal can output UTF-8 characters. Configuration may be needed on Windows 10. --- hyfetch/neofetch_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyfetch/neofetch_util.py b/hyfetch/neofetch_util.py index 4890ae86..c0fc8667 100644 --- a/hyfetch/neofetch_util.py +++ b/hyfetch/neofetch_util.py @@ -344,7 +344,7 @@ def run_neofetch(asc: str, args: str = ''): with TemporaryDirectory() as tmp_dir: tmp_dir = Path(tmp_dir) path = tmp_dir / 'ascii.txt' - path.write_text(asc) + path.write_text(asc, 'utf-8') # Call neofetch with the temp file if args: @@ -378,7 +378,7 @@ def run_fastfetch(asc: str, args: str = '', legacy: bool = False): with TemporaryDirectory() as tmp_dir: tmp_dir = Path(tmp_dir) path = tmp_dir / 'ascii.txt' - path.write_text(asc) + path.write_text(asc, 'utf-8') # Call fastfetch with the temp file proc = subprocess.run([ff_path, '--raw' if legacy else '--file-raw', path.absolute(), *shlex.split(args)])