On 2006-10-19, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Neil Cerutti wrote:
>
>>> Note that 'K\xc3\xb6ni'.decode('utf-8') returns a Unicode
>>> object. With print this is implicitly converted to string. The
>>> char set used depends on your console
>>
>> No, the setting of the console encoding (sys.stdout.encoding) is
>> ignored.
>
> Nope, it is not ignored. This would not work then::
>
> In [2]: print 'K\xc3\xb6nig'.decode('utf-8')
> König
>
> In [3]: import sys
>
> In [4]: sys.getdefaultencoding()
> Out[4]: 'ascii'
Interesting! Thanks for the correction.
--
Neil Cerutti
This scene has a lot of activity. It is busy like a bee dive.
--Michael Curtis
--
http://mail.python.org/mailman/listinfo/python-list