On Thursday 02 September 2010, it occurred to ipatrol6...@yahoo.com to exclaim: > Correct in that regard. In Python 3.x, strings are by default considered > UTF-8. Wheras ASCII isn't a problem because it's fixed-width, UTF-8 will > give you a different character depending on the last byte value. Therefore > handling any kind of data that is not UTF-8 will need you to open it with > 'b' and uses bytes instead of str (literals with b'some value').
Except if it's text of a known encoding, in which case you just open it with that encoding. -- http://mail.python.org/mailman/listinfo/python-list