On Sun, 14 Dec 2008 06:48:19 +0100, Piotr Sobolewski wrote: > Then I tried to do this that way: > sys.stdout = codecs.getwriter("utf-8")(sys.__stdout__) > s = u"Stanisław Lem" > print u > This works but is even more combersome. > > So, my question is: what is the official, recommended Python way?
I'd make that first line: sys.stdout = codecs.getwriter('utf-8')(sys.stdout) Why is it even more cumbersome to execute that line *once* instead encoding at every ``print`` statement? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list