Windows vs. file.read

ipatrol6010 at yahoo.com ipatrol6010 at yahoo.com
Thu Sep 2 14:21:23 EDT 2010


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').

Just an FYI.


More information about the Python-list mailing list