In <mailman.2379.1265906673.28905.python-l...@python.org> mk <mrk...@gmail.com> writes:
>To make matters more complicated, str.encode() internally DECODES from >string into unicode: > >>> nu >'\xc4\x84' > >>> > >>> type(nu) ><type 'str'> > >>> nu.encode() >Traceback (most recent call last): > File "<stdin>", line 1, in <module> >UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 0: >ordinal not in range(128) >There's logic to this, although it makes my brain want to explode. :-) Thanks for pointing this one out! It could have easily pushed my Unicodephobia into the incurable zone... ~K -- http://mail.python.org/mailman/listinfo/python-list