Re: [whatwg/encoding] Editorial: make ISO-2022-JP encoder perform error state switch (#236)

@annevk commented on this pull request.



> @@ -2938,8 +2943,17 @@ and <var>code point</var>, runs these steps:
   <p class=note>If <var>pointer</var> is non-null, it is less than 8836 due to the nature of
   <a>index jis0208</a> and the <a>index pointer</a> operation.
 
- <li><p>If <var>pointer</var> is null, return <a>error</a> with
- <var>code point</var>.
+ <li>
+  <p>If <var>pointer</var> is null, then:
+
+  <ol>
+   <li><p>If <a>ISO-2022-JP encoder state</a> is <a lt="ISO-2022-JP encoder jis0208">jis0208</a>,

We don't do a state switch earlier when it's an error and Roman and I don't see why we should here. I should probably write some tests to ensure implementations do the right thing though.

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

Received on Wednesday, 21 October 2020 05:20:04 UTC