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

Predictable results when fed non-text data #22

Open
jayvdb opened this issue Aug 18, 2019 · 0 comments
Open

Predictable results when fed non-text data #22

jayvdb opened this issue Aug 18, 2019 · 0 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Aug 18, 2019

Need tests, and reliable/predictable exceptions, whenever a binary data (not text) is opened. Typically applications try to open a file with a specific encoding (usually utf-8) and let the exception explain that the input file is not acceptable.

In the bom-open model, the encoding shouldnt be specified, so the application can not rely the UnicodeDecodeException saying a specific encoding which should be used, especially if chardet returns a strange fallback encoding like latin1, or an empty result.

We need tests to ensure that the exception raised for non-textual input is predictable and reasonable, and documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant