Does this site look plain?

This site uses advanced css techniques

Most programmers need an ASCII chart now and then, and I go tired of not having one around so I wrote this very simple tool achart. It displays an ASCII character chart in one of the common bases -- octal, decimal, or hexadecimal -- and can optionally show the special control-code names (NUL, ESC, etc.).

Run without parameters, it shows a chart in decimal:

$ achart
ASCII chart, decimal representation

  0  ^@ |   1  ^A |   2  ^B |   3  ^C |   4  ^D |   5  ^E |   6  ^F |   7  ^G
  8  ^H |   9  ^I |  10  ^J |  11  ^K |  12  ^L |  13  ^M |  14  ^N |  15  ^O
 16  ^P |  17  ^Q |  18  ^R |  19  ^S |  20  ^T |  21  ^U |  22  ^V |  23  ^W
 24  ^X |  25  ^Y |  26  ^Z |  27  ^[ |  28  ^\ |  29  ^] |  30  ^^ |  31  ^_
 32  SP |  33   ! |  34   " |  35   # |  36   $ |  37   % |  38   & |  39   '
 40   ( |  41   ) |  42   * |  43   + |  44   , |  45   - |  46   . |  47   /
 48   0 |  49   1 |  50   2 |  51   3 |  52   4 |  53   5 |  54   6 |  55   7
 56   8 |  57   9 |  58   : |  59   ; |  60   < |  61   = |  62   > |  63   ?
 64   @ |  65   A |  66   B |  67   C |  68   D |  69   E |  70   F |  71   G
 72   H |  73   I |  74   J |  75   K |  76   L |  77   M |  78   N |  79   O
 80   P |  81   Q |  82   R |  83   S |  84   T |  85   U |  86   V |  87   W
 88   X |  89   Y |  90   Z |  91   [ |  92   \ |  93   ] |  94   ^ |  95   _
 96   ` |  97   a |  98   b |  99   c | 100   d | 101   e | 102   f | 103   g
104   h | 105   i | 106   j | 107   k | 108   l | 109   m | 110   n | 111   o
112   p | 113   q | 114   r | 115   s | 116   t | 117   u | 118   v | 119   w
120   x | 121   y | 122   z | 123   { | 124   | | 125   } | 126   ~ | 127  ^?

The base is determine by a number on the command line, and by prefixing the base with a dash, the lower 32 characters are shown as their control-character names. The valid bases are 8, 10 (the default), and 16.

For instance:

$ achart -16
ASCII chart, hex representation

00 NUL | 01 SOH | 02 STX | 03 ETX | 04 EOT | 05 ENQ | 06 ACK | 07 BEL
08  BS | 09  HT | 0A  LF | 0B  VT | 0C  FF | 0D  CR | 0E  SO | 0F  SI
10 DLE | 11 DC1 | 12 DC2 | 13 DC3 | 14 DC4 | 15 NAK | 16 SYN | 17 ETB
18 CAN | 19  EM | 1A SUB | 1B ESC | 1C  FS | 1D  GS | 1E  RS | 1F  US
20  SP | 21   ! | 22   " | 23   # | 24   $ | 25   % | 26   & | 27   '
28   ( | 29   ) | 2A   * | 2B   + | 2C   , | 2D   - | 2E   . | 2F   /
30   0 | 31   1 | 32   2 | 33   3 | 34   4 | 35   5 | 36   6 | 37   7
38   8 | 39   9 | 3A   : | 3B   ; | 3C   < | 3D   = | 3E   > | 3F   ?
40   @ | 41   A | 42   B | 43   C | 44   D | 45   E | 46   F | 47   G
48   H | 49   I | 4A   J | 4B   K | 4C   L | 4D   M | 4E   N | 4F   O
50   P | 51   Q | 52   R | 53   S | 54   T | 55   U | 56   V | 57   W
58   X | 59   Y | 5A   Z | 5B   [ | 5C   \ | 5D   ] | 5E   ^ | 5F   _
60   ` | 61   a | 62   b | 63   c | 64   d | 65   e | 66   f | 67   g
68   h | 69   i | 6A   j | 6B   k | 6C   l | 6D   m | 6E   n | 6F   o
70   p | 71   q | 72   r | 73   s | 74   t | 75   u | 76   v | 77   w
78   x | 79   y | 7A   z | 7B   { | 7C   | | 7D   } | 7E   ~ | 7F DEL

Again, this program is very simple, and I've used it for years.

Download the program here: achart.c