Skip to content

Expose the encoding of a document #121

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

Closed
SimonSapin opened this issue Nov 30, 2013 · 1 comment
Closed

Expose the encoding of a document #121

SimonSapin opened this issue Nov 30, 2013 · 1 comment

Comments

@SimonSapin
Copy link
Contributor

Based on various information provided by the API’s user (see #120) and in the input stream (BOM, <meta charset>), the parser decides which character encoding to use.

The used encoding for a parsed document should be exposed somehow. It is needed eg. as a fallback encoding for scripts and stylesheets referred to by the document.

@SimonSapin
Copy link
Contributor Author

This is actually accessible as HTML5Parser.tokenizer.stream.charEncoding.

SimonSapin added a commit to SimonSapin/html5lib-python that referenced this issue Nov 30, 2013
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