Skip to content

Commit 651f672

Browse files
committed
remove Gecko quirks from shift_jis
1 parent 58eb729 commit 651f672

File tree

2 files changed

+8
-40
lines changed

2 files changed

+8
-40
lines changed

Overview.html

+4-20
Original file line numberDiff line numberDiff line change
@@ -1456,8 +1456,6 @@ <h3 id="iso-2022-jp"><span class="secno">10.2 </span><dfn>iso-2022-jp</dfn></h3>
14561456

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

1459-
<p>The <dfn id="shift_jis-fallback-code-point">shift_jis fallback code point</dfn> is U+30FB.</p>
1460-
14611459
<p>The <dfn id="shift_jis-lead">shift_jis lead</dfn> is initially 0x00.
14621460

14631461
<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:
@@ -1486,17 +1484,12 @@ <h3 id="shift_jis"><span class="secno">10.3 </span><dfn>shift_jis</dfn></h3>
14861484
0x80 to 0xFC, run these substeps:
14871485

14881486
<ol>
1487+
<!-- JAPANESE DRAGONS (more scary and crazy) -->
1488+
14891489
<li><p>Set <var title="">offset</var> to 0x40 if <var title="">byte</var> is
14901490
less than 0x7F, or 0x41 otherwise.
14911491
<!-- offset = byte < 0x7F ? 0x40 : 0x41 -->
14921492

1493-
<li><p>If <var title="">lead</var> is in the range 0xF0 to 0xF9, this is a
1494-
<a href="#decoder-error">decoder error</a>; emit a code point whose value is
1495-
0xE000 + (<var title="">lead</var> − 0xF0) × 188 +
1496-
<var title="">byte</var><var title="">offset</var>.
1497-
1498-
<!--JAPANESE DRAGONS (more scary and crazy)-->
1499-
15001493
<li><p>Let <var title="">adjust</var> be 0, or 1 if <var title="">byte</var>
15011494
is less than 0x9F.
15021495
<!-- adjust = byte < 159 -->
@@ -1520,12 +1513,8 @@ <h3 id="shift_jis"><span class="secno">10.3 </span><dfn>shift_jis</dfn></h3>
15201513
(<var title="">row</var>, <var title="">byte</var><var title="">offset</var>).
15211514
<!-- cell = byte - offset -->
15221515

1523-
<li>
1524-
<p>If <var title="">code point</var> is null, this is a
1525-
<a href="#decoder-error">decoder error</a>; emit the
1526-
<a href="#shift_jis-fallback-code-point">shift_jis fallback code point</a>.
1527-
1528-
<p class="note">This is not your normal <a href="#fallback-code-point">fallback code point</a>!
1516+
<li><p>If <var title="">code point</var> is null, this is a
1517+
<a href="#decoder-error">decoder error</a>.
15291518

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

1541-
<li><p>If <var title="">byte</var> is 0xA0, emit U+F8F0.
1542-
15431530
<li><p>If <var title="">byte</var> is in the range 0xA1 to 0xDF, emit a
15441531
code point whose value is 0xFF61 − 0xA1 + <var title="">byte</var>.
15451532
<!-- katakana -->
15461533

1547-
<li><p>If <var title="">byte</var> is in the range 0xFD to 0xFF, emit a
1548-
code point whose value is 0xF7F4 + <var title="">byte</var>.
1549-
15501534
<li><p>If <var title="">byte</var> is in the range 0x81 to 0x9F or
15511535
0xE0 to 0xFC, set <a href="#shift_jis-lead">shift_jis lead</a> to <var title="">byte</var> and
15521536
continue.

Overview.src.html

+4-20
Original file line numberDiff line numberDiff line change
@@ -1423,8 +1423,6 @@ <h3><dfn>iso-2022-jp</dfn></h3>
14231423

14241424
<h3><dfn>shift_jis</dfn></h3>
14251425

1426-
<p>The <dfn>shift_jis fallback code point</dfn> is U+30FB.</p>
1427-
14281426
<p>The <dfn>shift_jis lead</dfn> is initially 0x00.
14291427

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

14551453
<ol>
1454+
<!-- JAPANESE DRAGONS (more scary and crazy) -->
1455+
14561456
<li><p>Set <var title>offset</var> to 0x40 if <var title>byte</var> is
14571457
less than 0x7F, or 0x41 otherwise.
14581458
<!-- offset = byte < 0x7F ? 0x40 : 0x41 -->
14591459

1460-
<li><p>If <var title>lead</var> is in the range 0xF0 to 0xF9, this is a
1461-
<span>decoder error</span>; emit a code point whose value is
1462-
0xE000 + (<var title>lead</var> &minus; 0xF0) &times; 188 +
1463-
<var title>byte</var> &minus; <var title>offset</var>.
1464-
1465-
<!--JAPANESE DRAGONS (more scary and crazy)-->
1466-
14671460
<li><p>Let <var title>adjust</var> be 0, or 1 if <var title>byte</var>
14681461
is less than 0x9F.
14691462
<!-- adjust = byte < 159 -->
@@ -1487,12 +1480,8 @@ <h3><dfn>shift_jis</dfn></h3>
14871480
(<var title>row</var>, <var title>byte</var> &minus; <var title>offset</var>).
14881481
<!-- cell = byte - offset -->
14891482

1490-
<li>
1491-
<p>If <var title>code point</var> is null, this is a
1492-
<span>decoder error</span>; emit the
1493-
<span>shift_jis fallback code point</span>.
1494-
1495-
<p class=note>This is not your normal <span>fallback code point</span>!
1483+
<li><p>If <var title>code point</var> is null, this is a
1484+
<span>decoder error</span>.
14961485

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

1508-
<li><p>If <var title>byte</var> is 0xA0, emit U+F8F0.
1509-
15101497
<li><p>If <var title>byte</var> is in the range 0xA1 to 0xDF, emit a
15111498
code point whose value is 0xFF61 &minus; 0xA1 + <var title>byte</var>.
15121499
<!-- katakana -->
15131500

1514-
<li><p>If <var title>byte</var> is in the range 0xFD to 0xFF, emit a
1515-
code point whose value is 0xF7F4 + <var title>byte</var>.
1516-
15171501
<li><p>If <var title>byte</var> is in the range 0x81 to 0x9F or
15181502
0xE0 to 0xFC, set <span>shift_jis lead</span> to <var title>byte</var> and
15191503
continue.

0 commit comments

Comments
 (0)