It looks like a Unicode vs ASCII issue - os.listdir
is returning a list of ASCII strings.
Edit: I tried it on Python 3.0, also on XP SP2, and os.listdir
simply omitted the Hebrew filenames instead of listing them at all.
According to the docs, this means it was unable to decode it:
Note that when os.listdir() returns a list of strings, filenames that cannot be decoded properly are omitted rather than raising UnicodeError.