UTF-8 to unicode or latin-1 (and yes, I read the FAQ)
horpner at yahoo.com
Thu Oct 19 18:33:23 CEST 2006
On 2006-10-19, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
> In <slrnejf84b.rk.horpner at FIAD06.norwich.edu>, 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
> Nope, it is not ignored. This would not work then::
> In : print 'K\xc3\xb6nig'.decode('utf-8')
> In : import sys
> In : sys.getdefaultencoding()
> Out: 'ascii'
Interesting! Thanks for the correction.
This scene has a lot of activity. It is busy like a bee dive.
More information about the Python-list