EUC-JP 文字表 - 幅広版

TextDecoder を使用して EUC-JP を Unicode に変換して表示します。

表示されるものはブラウザにある変換表次第になります。

行列は JIS X 0208 の区点と同じハズです。

<p class="codepen" data-height="300" data-default-tab="result" data-slug-hash="QWJgyWa" data-user="ikiuo" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
  <span>See the Pen <a href="https://codepen.io/ikiuo/pen/QWJgyWa">
  EUC-JP 文字表</a> by Ikiuo (<a href="https://codepen.io/ikiuo">@ikiuo</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>

```HTML:
<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <title>EUC-JP 文字表</title>
    <style>
     table {
         border: solid 0px;
         border-left: solid 1px lightgray;
         border-top: solid 1px lightgray;
         border-collaspe: collaspe;
         border-spacing: 0;
     }
     th, td {
         border: solid 0px;
         border-right: solid 1px lightgray;
         border-bottom: solid 1px lightgray;
         padding: 0.2em;
     }
     th {
         background-color: #eeeeee;
     }
     td {
         text-align: center;
     }
     .undef {
         background-color: #ffeeff;
     }
     .xxsmall {
         font-size: xx-small;
     }
    </style>
  </head>
  <body>
    <script>

     window.onload = function() {
         const td_unassigned = '<td class="undef"></td>';

         const decoder = new TextDecoder('euc-jp');
         const buffer = new ArrayBuffer(2);
         const view = new DataView(buffer);
         const euc_jp = new Map();

         for (let h = 0xa1; h <= 0xfe; ++h) {
             view.setUint8(0, h);
             for (let l = 0xa1; l <= 0xfe; ++l) {
                 view.setUint8(1, l);

                 const us = decoder.decode(view);
                 if (us.length < 1)
                     continue;
                 if (us.charCodeAt(0) == 0xfffd)
                     continue;
                 euc_jp.set(view.getUint16(0, false), us);
             }
         }

         html = '<table border="1">';
         html += '<tr><th colspan="96">EUC-JP 文字表</th></tr>';

         html += '<tr><th></th><th></th>';
         for (let l = 0xa1; l <= 0xfe; ++l)
             html += `<th class="xxsmall">${l-0xa0}</th>`;
         html += '</tr>';
         html += '<tr><th></th><th></th>';
         for (let l = 0xa1; l <= 0xfe; ++l)
             html += `<th class="xxsmall">${l.toString(16).toUpperCase()}</th>`;
         html += '</tr>';

         for (let h = 0xa1; h <= 0xfe; ++h) {
             const hh = h << 8;
             html += '<tr>';
             html += `<th class="xxsmall">${h-0xa0}</th>`;
             html += `<th class="xxsmall">${h.toString(16).toUpperCase()}</th>`;
             for (let l = 0xa1; l <= 0xfe; ++l) {
                 const us = euc_jp.get(hh + l);
                 if (!us)
                     html += td_unassigned;
                 else
                     html += `<td class="xxsmall">${us}</td>`;
             }
             html += '</tr>';
         }
         html += '</table>'

         document.body.innerHTML = html;
     }

    </script>
  </body>
</html>
```