Skip to content

Commit

Permalink
remove Gecko quirks from shift_jis
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Apr 9, 2012
1 parent 58eb729 commit 651f672
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 40 deletions.
24 changes: 4 additions & 20 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -1456,8 +1456,6 @@ <h3 id="iso-2022-jp"><span class="secno">10.2 </span><dfn>iso-2022-jp</dfn></h3>

<h3 id="shift_jis"><span class="secno">10.3 </span><dfn>shift_jis</dfn></h3>

<p>The <dfn id="shift_jis-fallback-code-point">shift_jis fallback code point</dfn> is U+30FB.</p>

<p>The <dfn id="shift_jis-lead">shift_jis lead</dfn> is initially 0x00.

<p>The <dfn id="shift_jis-decoder">shift_jis decoder</dfn> (<a href="#decoder">decoder</a> for <a href="#shift_jis">shift_jis</a>) is:
Expand Down Expand Up @@ -1486,17 +1484,12 @@ <h3 id="shift_jis"><span class="secno">10.3 </span><dfn>shift_jis</dfn></h3>
0x80 to 0xFC, run these substeps:

<ol>
<!-- JAPANESE DRAGONS (more scary and crazy) -->

<li><p>Set <var title="">offset</var> to 0x40 if <var title="">byte</var> is
less than 0x7F, or 0x41 otherwise.
<!-- offset = byte < 0x7F ? 0x40 : 0x41 -->

<li><p>If <var title="">lead</var> is in the range 0xF0 to 0xF9, this is a
<a href="#decoder-error">decoder error</a>; emit a code point whose value is
0xE000 + (<var title="">lead</var> − 0xF0) × 188 +
<var title="">byte</var><var title="">offset</var>.

<!--JAPANESE DRAGONS (more scary and crazy)-->

<li><p>Let <var title="">adjust</var> be 0, or 1 if <var title="">byte</var>
is less than 0x9F.
<!-- adjust = byte < 159 -->
Expand All @@ -1520,12 +1513,8 @@ <h3 id="shift_jis"><span class="secno">10.3 </span><dfn>shift_jis</dfn></h3>
(<var title="">row</var>, <var title="">byte</var><var title="">offset</var>).
<!-- cell = byte - offset -->

<li>
<p>If <var title="">code point</var> is null, this is a
<a href="#decoder-error">decoder error</a>; emit the
<a href="#shift_jis-fallback-code-point">shift_jis fallback code point</a>.

<p class="note">This is not your normal <a href="#fallback-code-point">fallback code point</a>!
<li><p>If <var title="">code point</var> is null, this is a
<a href="#decoder-error">decoder error</a>.

<li><p>Emit <var title="">code point</var>.
</ol>
Expand All @@ -1538,15 +1527,10 @@ <h3 id="shift_jis"><span class="secno">10.3 </span><dfn>shift_jis</dfn></h3>
code point whose value is <var title="">byte</var>.
<!-- Opera has 0x7E -->

<li><p>If <var title="">byte</var> is 0xA0, emit U+F8F0.

<li><p>If <var title="">byte</var> is in the range 0xA1 to 0xDF, emit a
code point whose value is 0xFF61 − 0xA1 + <var title="">byte</var>.
<!-- katakana -->

<li><p>If <var title="">byte</var> is in the range 0xFD to 0xFF, emit a
code point whose value is 0xF7F4 + <var title="">byte</var>.

<li><p>If <var title="">byte</var> is in the range 0x81 to 0x9F or
0xE0 to 0xFC, set <a href="#shift_jis-lead">shift_jis lead</a> to <var title="">byte</var> and
continue.
Expand Down
24 changes: 4 additions & 20 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,6 @@ <h3><dfn>iso-2022-jp</dfn></h3>

<h3><dfn>shift_jis</dfn></h3>

<p>The <dfn>shift_jis fallback code point</dfn> is U+30FB.</p>

<p>The <dfn>shift_jis lead</dfn> is initially 0x00.

<p>The <dfn>shift_jis decoder</dfn> (<span>decoder</span> for <span>shift_jis</span>) is:
Expand Down Expand Up @@ -1453,17 +1451,12 @@ <h3><dfn>shift_jis</dfn></h3>
0x80 to 0xFC, run these substeps:

<ol>
<!-- JAPANESE DRAGONS (more scary and crazy) -->

<li><p>Set <var title>offset</var> to 0x40 if <var title>byte</var> is
less than 0x7F, or 0x41 otherwise.
<!-- offset = byte < 0x7F ? 0x40 : 0x41 -->

<li><p>If <var title>lead</var> is in the range 0xF0 to 0xF9, this is a
<span>decoder error</span>; emit a code point whose value is
0xE000 + (<var title>lead</var> &minus; 0xF0) &times; 188 +
<var title>byte</var> &minus; <var title>offset</var>.

<!--JAPANESE DRAGONS (more scary and crazy)-->

<li><p>Let <var title>adjust</var> be 0, or 1 if <var title>byte</var>
is less than 0x9F.
<!-- adjust = byte < 159 -->
Expand All @@ -1487,12 +1480,8 @@ <h3><dfn>shift_jis</dfn></h3>
(<var title>row</var>, <var title>byte</var> &minus; <var title>offset</var>).
<!-- cell = byte - offset -->

<li>
<p>If <var title>code point</var> is null, this is a
<span>decoder error</span>; emit the
<span>shift_jis fallback code point</span>.

<p class=note>This is not your normal <span>fallback code point</span>!
<li><p>If <var title>code point</var> is null, this is a
<span>decoder error</span>.

<li><p>Emit <var title>code point</var>.
</ol>
Expand All @@ -1505,15 +1494,10 @@ <h3><dfn>shift_jis</dfn></h3>
code point whose value is <var title>byte</var>.
<!-- Opera has 0x7E -->

<li><p>If <var title>byte</var> is 0xA0, emit U+F8F0.

<li><p>If <var title>byte</var> is in the range 0xA1 to 0xDF, emit a
code point whose value is 0xFF61 &minus; 0xA1 + <var title>byte</var>.
<!-- katakana -->

<li><p>If <var title>byte</var> is in the range 0xFD to 0xFF, emit a
code point whose value is 0xF7F4 + <var title>byte</var>.

<li><p>If <var title>byte</var> is in the range 0x81 to 0x9F or
0xE0 to 0xFC, set <span>shift_jis lead</span> to <var title>byte</var> and
continue.
Expand Down

0 comments on commit 651f672

Please sign in to comment.