Skip to content

Commit

Permalink
Fix #9: exclude pointers for the big5 encoder to avoid doing the wron…
Browse files Browse the repository at this point in the history
…g thing for duplicate code points
  • Loading branch information
annevk committed Sep 6, 2015
1 parent ce4e83d commit 531648f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
15 changes: 6 additions & 9 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p><a class="logo" href="https://whatwg.org/"><img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-encoding.svg" width="100"></a></p>
<h1>Encoding</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-31-august-2015">Living Standard — Last Updated 31 August 2015</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-6-september-2015">Living Standard — Last Updated 6 September 2015</h2>

<dl>
<dt>Participate:
Expand Down Expand Up @@ -878,7 +878,11 @@ <h2 id="indexes"><span class="secno">6 </span>Indexes</h2>
these steps:

<ol>
<li><p>Let <var>index</var> be <a href="#index-big5">index big5</a>.
<li>
<p>Let <var>index</var> be <a href="#index-big5">index big5</a> excluding all pointers less than
(0xA1 - 0x81) × 157.

<p class="note">Avoid returning Hong Kong Supplementary Character Set extensions literally.

<li>
<p>If <var>code point</var> is U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345,
Expand Down Expand Up @@ -1899,13 +1903,6 @@ <h4 id="big5-encoder"><span class="secno">12.1.2 </span><dfn>big5 encoder</dfn><

<li><p>Let <var>lead</var> be <var title="">pointer</var> / 157 + 0x81.

<li>
<p>If <var>lead</var> is less than 0xA1, return <a href="#error">error</a> with
<var title="">code point</var>.

<p class="note">Avoid returning Hong Kong Supplementary Character Set extensions
literally.

<li><p>Let <var>trail</var> be <var title="">pointer</var> % 157.

<li><p>Let <var>offset</var> be 0x40 if <var>trail</var> is
Expand Down
13 changes: 5 additions & 8 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,11 @@ <h2>Indexes</h2>
these steps:

<ol>
<li><p>Let <var>index</var> be <span>index big5</span>.
<li>
<p>Let <var>index</var> be <span>index big5</span> excluding all pointers less than
(0xA1 - 0x81) &times; 157.

<p class=note>Avoid returning Hong Kong Supplementary Character Set extensions literally.

<li>
<p>If <var>code point</var> is U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345,
Expand Down Expand Up @@ -1813,13 +1817,6 @@ <h4><dfn>big5 encoder</dfn></h4>

<li><p>Let <var>lead</var> be <var title>pointer</var> / 157 + 0x81.

<li>
<p>If <var>lead</var> is less than 0xA1, return <span>error</span> with
<var title>code point</var>.

<p class=note>Avoid returning Hong Kong Supplementary Character Set extensions
literally.

<li><p>Let <var>trail</var> be <var title>pointer</var> % 157.

<li><p>Let <var>offset</var> be 0x40 if <var>trail</var> is
Expand Down

0 comments on commit 531648f

Please sign in to comment.