Skip to content

Commit

Permalink
fixed encoding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraflame4 committed Apr 20, 2023
1 parent 769c4c4 commit 820be37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CliRenderer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def cli_main(source: Path = typer.Argument(..., help="The path to source image."
typer.echo(f"Saving output to {output}...")
output.parent.mkdir(parents=True, exist_ok=True)
with open(output, "wb") as f:
f.write(string.encode("utf-16"))
f.write(string.encode("utf-8"))

print(string)
print(f"Saved output to {output}... Read it using `cat {output}`")
Expand Down
2 changes: 1 addition & 1 deletion CliRenderer/colorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ def color_char(image: Image.Image, chars: list[str], mask: Image.Image,bg_intens
back = Color.from_rgb(back_[0]*bg_intensity, back_[1]*bg_intensity , back_[2]*bg_intensity)
style = Style(color=fore, bold=True, bgcolor=back)
string.append(char, style=style)
string += "\n"
string += "\r\n"
return string
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = CliRenderer
version = 0.1.1
version = 0.1.2
author = ultraflame4
description = A CLI tool to render unicode art in the terminal
long_description = file: README.md
Expand Down

0 comments on commit 820be37

Please sign in to comment.