[whatwg/encoding] ISO-2022-JP does not reset state when returning error (Issue #358)

annevk created an issue (whatwg/encoding#358)

### What is the issue with the Encoding Standard?

As noted in https://github.com/web-platform-tests/wpt/pull/56892 by @ChALkeR when you stream ISO-2022-JP content in fatal mode you can get an exception and then after that exception it'll continue in the same state where it was before the exception.

Other encodings reset state when returning error.

I think this was intentional because of the non-fatal mode (should probably double check), but maybe for the fatal mode we should do something in the API. E.g., we could reset the internal decoder before throwing.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/358
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/encoding/issues/358@github.com>

Received on Sunday, 21 December 2025 07:36:46 UTC