..probably because sys.stdout.encoding
is None
in some cases. In some other
cases, it's just blatantly stupid stuff that happens. ARGHARGHARGH!11!!!!1eleven!‽‽‽‽
I've personally (hopefully) solved this in:
- http://wiki.python.org/moin/PrintFails
- http://stackoverflow.com/questions/492483/setting-the-correct-encoding-when-piping-stdout-in-python
- http://stackoverflow.com/questions/492483/setting-the-correct-encoding-when-piping-stdout-in-python/1169209#1169209
- http://daveagp.wordpress.com/2010/10/26/what-a-character/
- http://docs.python.org/release/3.1.2/using/cmdline.html?highlight=pythonioencoding#envvar-PYTHONIOENCODING