marc.vanhoomis...@gmail.com wrote:

> Le jeudi 14 août 2014 15:22:52 UTC+2, Vincent Vande Vyvre a écrit :

>> Are you really using Python 3 ?

>> $ python3 test.py
> 
> Actually, when I try using a terminal, it works:
> $ python3 test.py
> Réussi
> 
> But when I issue the same command using webmin (v. 1.700 - shell command),
> I got:
>> python3 test.py
> Traceback (most recent call last):
>   File "test.py", line 2, in <module>
>     print('R\xe9ussi')
> UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in
> position 1: ordinal not in range(128)
> 
> So, I guess it is merely a problem of webmin.

I have no idea how that might interact with webmin, but you could try to set 
the environment variable

PYTHONIOENCODING=utf-8


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to