You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the HTML contains a META tag with a different encoding than the one used to parse the document, a c.DOM_HUBBUB_HUBBUB_ERR_ENCODINGCHANGE error is returned by netsurf.
In this case, we must restart the parsing with the new detected encoding.
The detected encoding is stored in the document and we can get it with documentGetInputEncoding().
A good solution would be to read the first 1kb of data from the reader, and try to extract the charset declaration in zig.
Then use it to parse the document instead of the HTTP one.
Then the parser must receive a custom reader which will contain the read buffer first and the following data after.
When the HTML contains a META tag with a different encoding than the one used to parse the document, a
c.DOM_HUBBUB_HUBBUB_ERR_ENCODINGCHANGE
error is returned by netsurf.In this case, we must restart the parsing with the new detected encoding.
The detected encoding is stored in the document and we can get it with
documentGetInputEncoding()
.Relates with #152 and #153
Slack discussion: https://lightpanda.slack.com/archives/C05TRU6RBM1/p1705070165019409
The text was updated successfully, but these errors were encountered: