One of the great improvements of Python 3 over Python 2 is being able to work with non-ascii text, but it doesn't seem to be working on the pi :(
On my pc (python 3.4.1) this works as expected, printing 你好 to the console
but on my pi (python 3.6.1) I get this error:
Traceback (most recent call last): File "test.py", line 1, in <module> print('\u4f60\u597d') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
Is there some configuration I'm missing? I don't think it's the terminal setting since the command line
echo "你好" works.
If it makes any difference, I'm running Arch linux on the pi.