Re: the official way of printing unicode strings

2008-12-14 Thread Marc 'BlackJack' Rintsch
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 = uStanisł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

Re: the official way of printing unicode strings

2008-12-14 Thread Piotr Sobolewski
of printing unicode strings. I mean, the question is not how can I print the unicode string but how the creators of the language suppose me to print the unicode string. I couldn't find an answer to this question in docs, so I hope somebody here knows it. So, is it _the_ python way of printing

Re: the official way of printing unicode strings

2008-12-14 Thread J. Clifford Dyer
elementary task. And I just want to know what is the normal, official way of printing unicode strings. I mean, the question is not how can I print the unicode string but how the creators of the language suppose me to print the unicode string. I couldn't find an answer to this question in docs

Re: the official way of printing unicode strings

2008-12-14 Thread Ben Finney
python way of printing unicode strings? Try these: URL:http://effbot.org/zone/unicode-objects.htm URL:http://www.reportlab.com/i18n/python_unicode_tutorial.html URL:http://www.amk.ca/python/howto/unicode If you want something more official, try the PEP that introduced Unicode objects

Re: the official way of printing unicode strings

2008-12-14 Thread Martin v. Löwis
of printing unicode strings. I mean, the question is not how can I print the unicode string but how the creators of the language suppose me to print the unicode string. I couldn't find an answer to this question in docs, so I hope somebody here knows it. So, is it _the_ python way of printing unicode

the official way of printing unicode strings

2008-12-13 Thread Piotr Sobolewski
Hello, in Python (contrary to Perl, for instance) there is one way to do common tasks. Could somebody explain me what is the official python way of printing unicode strings? I tried to do this such way: s = uStanisław Lem print u.encode('utf-8') This works, but is very cumbersome. Then I tried