Skip to content

Commit

Permalink
[PR] #294 from luna-1024: Fix windows utf8
Browse files Browse the repository at this point in the history
Support unicode ascii art on Windows
  • Loading branch information
hykilpikonna authored May 24, 2024
2 parents e08e864 + 33fd55e commit 109d7d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hyfetch/neofetch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)])
Expand Down

0 comments on commit 109d7d2

Please sign in to comment.