> > By relying on the default when you read it, you're making an unspoken > assumption about the encoding of the file. > > -- > DaveA
So is there any way to sniff the encoding, including the BOM (which appears to be used or not used randomly for utf-8), so you can then use the proper encoding, or do you wander in the wilderness? I was going to use encoding = utf-8 as a suggested default. I noticed it got rid of the bom symbols but left an extra blank space at the beginning of the stream. Most books leave unicode to the very end, if they mention the BOM at all (mine is at page 977, which is still a bit off ;') _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor