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

This should say:
If code point is null and byte is an ASCII byte...

(As in the EUC-KR case.)

Or, better yet, reorder the steps so that code point gets returned early if it is non-null and then the "prepend" and "return error" steps don't need to be qualified with "if code point is null".

-- 
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#pullrequestreview-35323686

Received on Friday, 28 April 2017 10:15:40 UTC