I made a small application that prints unicode special characters(i.e. superscript, subscript...). When it runs locally there are no problems but when it runs in a ssh session I always get a UnicodeEncodeError.
Specifically: UnicodeEncodeError 'ascii' can't encode characters in position 0-1: ordinal not in range(128)
I tried different ssh clients, computers and double checked the sessions encoding but the result is the same.
This is really weird. Why does this happen? Is this really related to ssh?
The problem might be not your Python code, check your ssh ENV. LANG should be en_US.UTF-8 (containing UTF-8) not ASCII
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With