8000 openstream and other methods should allow both unicode and utf8 for stream names · Issue #119 · decalage2/olefile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
openstream and other methods should allow both unicode and utf8 for stream names #119
Open
@decalage2

Description

@decalage2

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)

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0