On 18/11/2013 15:25, Victor Stinner wrote:
Why do you need to force the UTF-8 encoding? Your locale is not
correctly configured?
It's better to set PYTHONIOENCODING rather than replacing
sys.stdout/stderr at runtime.
There is an open issue to add a TextIOWrapper.set_encoding() method:
http://bu
On 18/11/2013 11:47, Robin Becker wrote:
...
#c:\python33\lib\site-packages\sitecustomize.py
import sys, codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
sys.stderr = codecs.getwriter("utf-8")(sys.stderr.detach())
it seems that the above needs extra stuff to ma
On 15/11/2013 18:16, random...@fastmail.us wrote:
Of course, the real solution to this issue is to replace sys.stdout on
windows with an object that can handle Unicode directly with the
WriteConsoleW function - the problem there is that it will break code
that expects to be able to use sys.stdout