Support unicode ascii art on Windows

Windows Terminal can output UTF-8 characters. Configuration may be needed on Windows 10.
This commit is contained in:
Luna 2024-05-22 13:39:42 -07:00
parent e08e864be0
commit 33fd55e6ad

View file

@ -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)])