exclude binary files from os.walk

Alex Martelli aleaxit at yahoo.com
Thu Jan 27 10:19:57 EST 2005


Craig Ringer <craig at postnewspapers.com.au> wrote:

> That's not really safe when dealing with utf-8 files though, and IIRC
> with UCS2 or UCS4 as well. The Unicode BOM its self might (I'm not sure)
> qualify as ASCII.

Nope, both bytes in the BOM have the high-order bit set -- they're 0xFF
and 0xFE -- so they definitely don't qualify as ASCII.


Alex



More information about the Python-list mailing list