the stupid encoding problem to stdout

Sérgio Monteiro Basto sergiomb at sapo.pt
Thu Jun 9 21:17:16 EDT 2011


Mark Tolonen wrote:

> 
> "Sérgio Monteiro Basto" <sergiomb at sapo.pt> wrote in message
> news:4df137a7$0$30580$a729d347 at news.telepac.pt...
> 
>> How I change sys.stdout.encoding always to UTF-8 ? at least have a
>> consistent sys.stdout.encoding
> 
> There is an environment variable that can force Python I/O to be a specfic
> encoding:
> 
>     PYTHONIOENCODING=utf-8

Excellent thanks , double thanks.

BTW: should be set by default on a utf-8 systems like Fedora, Ubuntu, Debian 
, Redhat, and all Linuxs. For sure I will put this on startup of my systems.
 
> -Mark
--
Sérgio M. B.



More information about the Python-list mailing list