browser icon indicating copy to clipboard operation
browser copied to clipboard

netsurf: handle encoding change parser error

Open krichprollsch opened this issue 1 year ago • 1 comments

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

krichprollsch avatar Jan 12 '24 14:01 krichprollsch