Closed jborg closed 10 years ago
On Python 3 functions like os.listdir() always returns unicode paths. "invalid" byte paths are decoded using the "surrogateescape" error handler which must also be used when decoding. See os.fsencodefs() and os.fsdecode().
Hmm, I don't like too much the "silent" handling of errors via surogateescape, but if Python itself does this, then it's good enough.
Released in version 0.5.3 (https://pypi.python.org/pypi/pyxattr/0.5.3). Thanks!
On Python 3 functions like os.listdir() always returns unicode paths. "invalid" byte paths are decoded using the "surrogateescape" error handler which must also be used when decoding. See os.fsencodefs() and os.fsdecode().