Re: [Python-3000] Console encoding detection broken

2007-08-11 Thread Martin v. Löwis
> Feel free to add code that implements this. I suppose it would be a > good idea to have a separate function io.guess_console_encoding(...) > which takes some argument (perhaps a raw file?) and returns an > encoding name, never None. This could then be implemented by switching > on the platform in

Re: [Python-3000] Console encoding detection broken

2007-08-10 Thread Guido van Rossum
On 8/9/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Georg Brandl schrieb: > > Well, subject says it all. While 2.5 sets sys.std*.encoding correctly to > > UTF-8, 3k sets it to 'latin-1', breaking output of Unicode strings. > > And not surprisingly so: io.py says > > if encoding is Non

Re: [Python-3000] Console encoding detection broken

2007-08-09 Thread Martin v. Löwis
Georg Brandl schrieb: > Well, subject says it all. While 2.5 sets sys.std*.encoding correctly to > UTF-8, 3k sets it to 'latin-1', breaking output of Unicode strings. And not surprisingly so: io.py says if encoding is None: # XXX This is questionable encoding = sys

[Python-3000] Console encoding detection broken

2007-08-09 Thread Georg Brandl
Well, subject says it all. While 2.5 sets sys.std*.encoding correctly to UTF-8, 3k sets it to 'latin-1', breaking output of Unicode strings. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of