Re: [whatwg/encoding] EUC-JP: only unwind ASCII bytes (#103)

hsivonen commented on this pull request.



> @@ -1923,8 +1923,7 @@ consumers of content generated with <a>GBK</a>'s <a for=/>encoder</a>.
 
    <li><p>Unset the <a>EUC-JP jis0212 flag</a>.
 
-   <li><p>If <var>byte</var> is not in the range 0xA1 to 0xFE, inclusive,
-   <a>prepend</a> <var>byte</var> to
+   <li><p>If <var>byte</var> is an <a>ASCII byte</a>, <a>prepend</a> <var>byte</var> to

I think the definitions would become more readable if there was an early return with code point if code point is not null and then as ASCIIness/prepend check and then return error.

But you are right that in the case of EUC-JP, the trail can't be in the ASCII range, so maybe it's best to land this without the null check reordering and then do the null check  reordering as a separate editorial-only changeset.

-- 
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/103#discussion_r114977005

Received on Friday, 5 May 2017 11:35:57 UTC