Re: print vs sys.stdout.write, and UnicodeError

2007-10-25 Thread Brent Lievers
Martin Marcher <[EMAIL PROTECTED]> wrote: > 25 Oct 2007 17:37:01 GMT, Brent Lievers <[EMAIL PROTECTED]>: >> Greetings, >> >> I have observed the following (python 2.5.1): >> >> >>> import sys >> >>> print sys.stdout.encoding >> UTF-8 >> >>> print(u'\u00e9') >> ? >> >>> sys.stdout.write(u'\u00e9\n')

Re: print vs sys.stdout.write, and UnicodeError

2007-10-25 Thread Martin Marcher
25 Oct 2007 17:37:01 GMT, Brent Lievers <[EMAIL PROTECTED]>: > Greetings, > > I have observed the following (python 2.5.1): > > >>> import sys > >>> print sys.stdout.encoding > UTF-8 > >>> print(u'\u00e9') > é > >>> sys.stdout.write(u'\u00e9\n') > Traceback (most recent call last): > File "", lin

print vs sys.stdout.write, and UnicodeError

2007-10-25 Thread Brent Lievers
Greetings, I have observed the following (python 2.5.1): >>> import sys >>> print sys.stdout.encoding UTF-8 >>> print(u'\u00e9') é >>> sys.stdout.write(u'\u00e9\n') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in posi