iustin / pyxattr

A python module for accessing filesystem Extended Attributes
https://pyxattr.k1024.org/
GNU Lesser General Public License v2.1
31 stars 14 forks source link

Use "surrogateescape" error handler when encoding unicode paths. #3

Closed jborg closed 10 years ago

jborg commented 11 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().

iustin commented 10 years ago

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.

iustin commented 10 years ago

Released in version 0.5.3 (https://pypi.python.org/pypi/pyxattr/0.5.3). Thanks!