[Bug 27256] revamp iso-2022-jp decoder/encoder

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27256

--- Comment #6 from Anne <annevk@annevk.nl> ---
Notes on reverse engineering error handling:

* An erroneous escape sequence results in ASCII state in Firefox. Chrome
replaces the first byte (the ESC) with U+FFFD and reinterprets what follows.
(There's an edge case where if the input is 0x1B 0x24, Chrome replaces both
with U+FFFD.)
* A repeated escape sequence results in U+FFFD in Chrome, as well as switching
to the newly indicated state. Firefox just switches.
* Firefox does not seem to support the ASCII escape sequence in the ASCII
state.
* Chrome recognizes escape sequences when looking at trail bytes.

I think I have a model now that roughly aligns with Chrome, but corrects some
obvious mistakes. I have also written tests which I'll submit to
web-platform-tests.

Still need to write it out.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 7 November 2014 14:31:22 UTC