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:
@@ -344,7 +344,7 @@ def run_neofetch(asc: str, args: str = ''):
|
|||||||
with TemporaryDirectory() as tmp_dir:
|
with TemporaryDirectory() as tmp_dir:
|
||||||
tmp_dir = Path(tmp_dir)
|
tmp_dir = Path(tmp_dir)
|
||||||
path = tmp_dir / 'ascii.txt'
|
path = tmp_dir / 'ascii.txt'
|
||||||
path.write_text(asc)
|
path.write_text(asc, 'utf-8')
|
||||||
|
|
||||||
# Call neofetch with the temp file
|
# Call neofetch with the temp file
|
||||||
if args:
|
if args:
|
||||||
@@ -378,7 +378,7 @@ def run_fastfetch(asc: str, args: str = '', legacy: bool = False):
|
|||||||
with TemporaryDirectory() as tmp_dir:
|
with TemporaryDirectory() as tmp_dir:
|
||||||
tmp_dir = Path(tmp_dir)
|
tmp_dir = Path(tmp_dir)
|
||||||
path = tmp_dir / 'ascii.txt'
|
path = tmp_dir / 'ascii.txt'
|
||||||
path.write_text(asc)
|
path.write_text(asc, 'utf-8')
|
||||||
|
|
||||||
# Call fastfetch with the temp file
|
# Call fastfetch with the temp file
|
||||||
proc = subprocess.run([ff_path, '--raw' if legacy else '--file-raw', path.absolute(), *shlex.split(args)])
|
proc = subprocess.run([ff_path, '--raw' if legacy else '--file-raw', path.absolute(), *shlex.split(args)])
|
||||||
|
|||||||
Reference in New Issue
Block a user