-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non unicode path error on Linux when scanning a dir with unicode as input #86
Comments
Thanks @pombredanne. On Python 2, scandir with a Unicode path ( |
@benhoyt Thank you for having looked into this! The unicode error happens also when not printing to the console with Python 2:
|
In the end the issue is the lack of a surrogateescape handler for Python2. |
With Python 2.7.13, on Linux (fs.encoding is UTF-8) I get this error:
FWIW, os.listdir is completely out of whackon Python 2 returning a mix of bytes or unicode:
While Python 3 uses surrogate escape for decoding to unicode:
The text was updated successfully, but these errors were encountered: