Program works great, except under less, cron or execl (Unicode?)
ldo at geek-central.gen.new_zealand
Wed Sep 24 12:36:44 CEST 2008
<c89b7723-50c4-432f-a1e8-7f62f1232ece at v16g2000prc.googlegroups.com>, Sam
> So how can I set sys.stdout.encoding so it's UTF-8 when piped through
> cat (or anything else).
> I tried assigning to it, but no dice.
You could try wrapping it in a file object that does explicit encoding
translation, using codecs.EncodedFile
More information about the Python-list