Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode characters not supported #275

Open
bheadmaster opened this issue Mar 27, 2018 · 2 comments
Open

Unicode characters not supported #275

bheadmaster opened this issue Mar 27, 2018 · 2 comments

Comments

@bheadmaster
Copy link

Piping slavic characters (ponysay "š", for example) ponysay 3.0.3, in a termite terminal emulator on Arch Linux system, prints a following error:

Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/bin/ponysay/main.py", line 154, in
File "/usr/bin/ponysay/ponysay.py", line 258, in run
File "/usr/bin/ponysay/ponysay.py", line 309, in __run
File "/usr/bin/ponysay/ponysay.py", line 940, in printPony
File "/usr/bin/ponysay/ponysay.py", line 1139, in __printOutput
File "/usr/bin/ponysay/common.py", line 56, in print
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 29-30: surrogates not allowed

@JockeTF
Copy link

JockeTF commented Mar 27, 2018

Works for me in GNOME Terminal, Guake, and Termite.

Also on Arch Linux with Ponysay 3.0.3 using the en_US.UTF-8 locale.

@DDR0
Copy link

DDR0 commented Jul 16, 2019

Running on Debian 8 with Python 3.4, with all ponies enabled, but no unicode in the message, I get a similar error message about 5% of the time. No pony is printed.

Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/ponysay/__main__.py", line 154, in <module>
  File "/usr/bin/ponysay/ponysay.py", line 254, in run
  File "/usr/bin/ponysay/ponysay.py", line 305, in __run
  File "/usr/bin/ponysay/ponysay.py", line 929, in printPony
  File "/usr/bin/ponysay/backend.py", line 116, in parse
  File "/usr/bin/ponysay/common.py", line 80, in printinfo
UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 577: ordinal not in range(128)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants