Skip to content
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

openstream and other methods should allow both unicode and utf8 for stream names #119

Open
decalage2 opened this issue Apr 23, 2019 · 0 comments
Assignees
Milestone

Comments

@decalage2
Copy link
Owner

For now, openstream and other stream-related methods expect a stream name in unicode on Python 3, and a bytes string encoded in UTF-8 by default on Python 2. It would be much better to allow both unicode and bytes, on both platforms, to avoid some issues.

It would even be a good idea to look for bytes using the original encoding of the directory as fallback, if a stream cannot be found using the unicode or utf8 representation. (in case the caller only has the original encoded name and does not know the encoding, for example if it's an exotic code page with no python codec)

@decalage2 decalage2 added this to the olefile 0.47 milestone Apr 23, 2019
@decalage2 decalage2 self-assigned this Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant