From fe4934c2eb49a2e0b3a630c35b9fa23f7cc16fc0 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sun, 2 Sep 2018 11:47:23 +0200 Subject: [PATCH] ISO-2022-JP encoder: document an oddity At this point it does not seem worth it to require further implementation changes and risk compatibility issues, so instead document the quirk. Closes #115. --- encoding.bs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/encoding.bs b/encoding.bs index db2a0f9..d348d76 100644 --- a/encoding.bs +++ b/encoding.bs @@ -2652,6 +2652,16 @@ consumers of content generated with GBK's encoder.

ISO-2022-JP encoder

+
+

The ISO-2022-JP encoder is the only encoder for which the concatenation of + multiple outputs can result in an error when run through the corresponding + decoder. + +

Encoding U+00A5 gives 0x1B 0x28 0x4A 0x5C + 0x1B 0x28 0x42. Doing that twice, concatenating the results, and then decoding yields U+00A5 U+FFFD + U+00A5. +

+

ISO-2022-JP's encoder has an associated ISO-2022-JP encoder state which is ASCII, Roman, or