Message31345
The fix given by gbrandl, which is to use
sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8')
does not work. EncodedFile expects to receive encoded strings, so if you try to use it with Unicode strings, you get errors. I could of course
I tried
sys.stdout = codecs.open(sys.stdout, 'w', 'utf-8')
but that gives me "Type Error: coercing to Unicode: need string or buffer, file found."
Since this was (absurdly) closed as invalid, are there any good fixes that actually work? |
|
Date |
User |
Action |
Args |
2007-08-23 14:52:07 | admin | link | issue1668295 messages |
2007-08-23 14:52:07 | admin | create | |
|