charset:asciiコード表

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
charset:asciiコード表 [2008/12/09 12:35] – Page moved from asciiコード表 to charset:asciiコード表 nakayamacharset:asciiコード表 [2019/08/19 07:05] (現在) ともやん
行 1: 行 1:
-ASCIIコード表+====== ASCIIコード表 ======
 <html> <html>
-    <table border="1" cellpadding="4" cellspacing="0" style="font-size: 16px; text-align: center;"> +<table border="1" cellpadding="4" cellspacing="0" 
-        <tr><td bgcolor="aquamarine">下位ビット→<br />↓上位ビット</td>+    style="font-size: 16px; text-align: center;"> 
 +    <tr><td bgcolor="aquamarine">下位ビット→<br />↓上位ビット</td>
 </html> </html>
 <php> <php>
 +for ($i = 0x00; $i <= 0x0f; $i = $i + 0x01)
 +{
 +    printf('<td bgcolor="aquamarine">%02X</td>', $i);
 +}
 +print('</tr>');
 +
 +for ($i = 0x00; $i <= 0x7f; $i = $i + 0x10)
 +{
 +    printf('<tr><td bgcolor="aquamarine">%02X</td>', $i);
 +    for ($j = 0x00; $j <= 0x0f; $j = $j + 0x01)
 +    {
 +        if ($i == 0x00 || $i == 0x10 || ($i == 0x20 && $j == 0x00))
 +        {
 +            // 制御文字の表示
 +              printf('<td>&#x%X;</td>', 0x2400 | $i | $j);
 +        }
 +        else if ($i == 0x70  && $j == 0x0f)
 +        {
 +            // 制御文字(DEL)の表示
 +              printf('<td>&#x%X;</td>', 0x2421);
 +        }
 +        else
 +        {
 +            printf('<td>%c</td>', $j | $i);
 +        }
 +    }
 +    print('</tr>');
 +}
 +</php>
 +<html>
 +</table>
 +</html>
 +
 +上記のコード表を生成するPHPコード
 +<code php>
 +<table border="1" cellpadding="4" cellspacing="0"
 +    style="font-size: 16px; text-align: center;">
 +    <tr><td bgcolor="aquamarine">下位ビット→<br />↓上位ビット</td>
     for ($i = 0x00; $i <= 0x0f; $i = $i + 0x01)     for ($i = 0x00; $i <= 0x0f; $i = $i + 0x01)
     {     {
行 10: 行 49:
     }     }
     print('</tr>');     print('</tr>');
-       +     
-    for ($i = 0x00; $i <= 0x7f; $i = $i + 0x10) {+    for ($i = 0x00; $i <= 0x7f; $i = $i + 0x10) 
 +    {
         printf('<tr><td bgcolor="aquamarine">%02X</td>', $i);         printf('<tr><td bgcolor="aquamarine">%02X</td>', $i);
-        for ($j = 0x00; $j <= 0x0f; $j = $j + 0x01) {+        for ($j = 0x00; $j <= 0x0f; $j = $j + 0x01) 
 +        {
             if ($i == 0x00 || $i == 0x10 || ($i == 0x20 && $j == 0x00))             if ($i == 0x00 || $i == 0x10 || ($i == 0x20 && $j == 0x00))
             {             {
行 26: 行 67:
             else             else
             {             {
-            printf('<td>%c</td>', $j | $i);+                printf('<td>%c</td>', $j | $i); 
 +            }
         }         }
 +        print('</tr>');
     }     }
-    print('</tr>'); +</table
-} +</code
-</php+
-<html> +
-    </table> +
-</html>+
  • charset/asciiコード表.1228793750.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)