The following table was created entirely with Perl, using CGI.pm and several other modules. The program listing is at the bottom.
Symbol | ASCII Value | URL encoded | HTML code |
---|---|---|---|
0 | %00 | � | |
1 | %01 |  | |
2 | %02 |  | |
3 | %03 |  | |
4 | %04 |  | |
5 | %05 |  | |
6 | %06 |  | |
7 | %07 |  | |
8 | %08 |  | |
9 | %09 | 	 | |
10 | %0A | | |
11 | %0B |  | |
12 | %0C |  | |
13 | %0D | | |
14 | %0E |  | |
15 | %0F |  | |
16 | %10 |  | |
17 | %11 |  | |
18 | %12 |  | |
19 | %13 |  | |
20 | %14 |  | |
21 | %15 |  | |
22 | %16 |  | |
23 | %17 |  | |
24 | %18 |  | |
25 | %19 |  | |
26 | %1A |  | |
27 | %1B |  | |
28 | %1C |  | |
29 | %1D |  | |
30 | %1E |  | |
31 | %1F |  | |
32 | %20 or + |   | |
! | 33 | %21 | ! |
" | 34 | %22 | " |
# | 35 | %23 | # |
$ | 36 | %24 | $ |
% | 37 | %25 | % |
& | 38 | %26 | & |
' | 39 | %27 | ' |
( | 40 | %28 | ( |
) | 41 | %29 | ) |
* | 42 | * | * |
+ | 43 | %2B | + |
, | 44 | %2C | , |
- | 45 | - | - |
. | 46 | . | . |
/ | 47 | %2F | / |
0 | 48 | 0 | 0 |
1 | 49 | 1 | 1 |
2 | 50 | 2 | 2 |
3 | 51 | 3 | 3 |
4 | 52 | 4 | 4 |
5 | 53 | 5 | 5 |
6 | 54 | 6 | 6 |
7 | 55 | 7 | 7 |
8 | 56 | 8 | 8 |
9 | 57 | 9 | 9 |
: | 58 | %3A | : |
; | 59 | %3B | ; |
< | 60 | %3C | < |
= | 61 | %3D | = |
> | 62 | %3E | > |
? | 63 | %3F | ? |
@ | 64 | %40 | @ |
A | 65 | A | A |
B | 66 | B | B |
C | 67 | C | C |
D | 68 | D | D |
E | 69 | E | E |
F | 70 | F | F |
G | 71 | G | G |
H | 72 | H | H |
I | 73 | I | I |
J | 74 | J | J |
K | 75 | K | K |
L | 76 | L | L |
M | 77 | M | M |
N | 78 | N | N |
O | 79 | O | O |
P | 80 | P | P |
Q | 81 | Q | Q |
R | 82 | R | R |
S | 83 | S | S |
T | 84 | T | T |
U | 85 | U | U |
V | 86 | V | V |
W | 87 | W | W |
X | 88 | X | X |
Y | 89 | Y | Y |
Z | 90 | Z | Z |
[ | 91 | %5B | [ |
\ | 92 | %5C | \ |
] | 93 | %5D | ] |
^ | 94 | %5E | ^ |
_ | 95 | _ | _ |
` | 96 | %60 | ` |
a | 97 | a | a |
b | 98 | b | b |
c | 99 | c | c |
d | 100 | d | d |
e | 101 | e | e |
f | 102 | f | f |
g | 103 | g | g |
h | 104 | h | h |
i | 105 | i | i |
j | 106 | j | j |
k | 107 | k | k |
l | 108 | l | l |
m | 109 | m | m |
n | 110 | n | n |
o | 111 | o | o |
p | 112 | p | p |
q | 113 | q | q |
r | 114 | r | r |
s | 115 | s | s |
t | 116 | t | t |
u | 117 | u | u |
v | 118 | v | v |
w | 119 | w | w |
x | 120 | x | x |
y | 121 | y | y |
z | 122 | z | z |
{ | 123 | %7B | { |
| | 124 | %7C | | |
} | 125 | %7D | } |
~ | 126 | %7E | ~ |
| 127 | %7F |  |
€ | 128 | %80 | € |
� | 129 | %81 |  |
‚ | 130 | %82 | ‚ |
ƒ | 131 | %83 | ƒ |
„ | 132 | %84 | „ |
… | 133 | %85 | … |
† | 134 | %86 | † |
‡ | 135 | %87 | ‡ |
ˆ | 136 | %88 | ˆ |
‰ | 137 | %89 | ‰ |
Š | 138 | %8A | Š |
‹ | 139 | %8B | ‹ |
Œ | 140 | %8C | Œ |
� | 141 | %8D |  |
Ž | 142 | %8E | Ž |
� | 143 | %8F |  |
� | 144 | %90 |  |
‘ | 145 | %91 | ‘ |
’ | 146 | %92 | ’ |
“ | 147 | %93 | “ |
” | 148 | %94 | ” |
• | 149 | %95 | • |
– | 150 | %96 | – |
— | 151 | %97 | — |
˜ | 152 | %98 | ˜ |
™ | 153 | %99 | ™ |
š | 154 | %9A | š |
› | 155 | %9B | › |
œ | 156 | %9C | œ |
� | 157 | %9D |  |
ž | 158 | %9E | ž |
Ÿ | 159 | %9F | Ÿ |
160 | %A0 | | |
¡ | 161 | %A1 | ¡ |
¢ | 162 | %A2 | ¢ |
£ | 163 | %A3 | £ |
¤ | 164 | %A4 | ¤ |
¥ | 165 | %A5 | ¥ |
¦ | 166 | %A6 | ¦ |
§ | 167 | %A7 | § |
¨ | 168 | %A8 | ¨ |
© | 169 | %A9 | © |
ª | 170 | %AA | ª |
« | 171 | %AB | « |
¬ | 172 | %AC | ¬ |
| 173 | %AD | ­ |
® | 174 | %AE | ® |
¯ | 175 | %AF | ¯ |
° | 176 | %B0 | ° |
± | 177 | %B1 | ± |
² | 178 | %B2 | ² |
³ | 179 | %B3 | ³ |
´ | 180 | %B4 | ´ |
µ | 181 | %B5 | µ |
¶ | 182 | %B6 | ¶ |
· | 183 | %B7 | · |
¸ | 184 | %B8 | ¸ |
¹ | 185 | %B9 | ¹ |
º | 186 | %BA | º |
» | 187 | %BB | » |
¼ | 188 | %BC | ¼ |
½ | 189 | %BD | ½ |
¾ | 190 | %BE | ¾ |
¿ | 191 | %BF | ¿ |
À | 192 | %C0 | À |
Á | 193 | %C1 | Á |
 | 194 | %C2 |  |
à | 195 | %C3 | à |
Ä | 196 | %C4 | Ä |
Å | 197 | %C5 | Å |
Æ | 198 | %C6 | Æ |
Ç | 199 | %C7 | Ç |
È | 200 | %C8 | È |
É | 201 | %C9 | É |
Ê | 202 | %CA | Ê |
Ë | 203 | %CB | Ë |
Ì | 204 | %CC | Ì |
Í | 205 | %CD | Í |
Î | 206 | %CE | Î |
Ï | 207 | %CF | Ï |
Ð | 208 | %D0 | Ð |
Ñ | 209 | %D1 | Ñ |
Ò | 210 | %D2 | Ò |
Ó | 211 | %D3 | Ó |
Ô | 212 | %D4 | Ô |
Õ | 213 | %D5 | Õ |
Ö | 214 | %D6 | Ö |
× | 215 | %D7 | × |
Ø | 216 | %D8 | Ø |
Ù | 217 | %D9 | Ù |
Ú | 218 | %DA | Ú |
Û | 219 | %DB | Û |
Ü | 220 | %DC | Ü |
Ý | 221 | %DD | Ý |
Þ | 222 | %DE | Þ |
ß | 223 | %DF | ß |
à | 224 | %E0 | à |
á | 225 | %E1 | á |
â | 226 | %E2 | â |
ã | 227 | %E3 | ã |
ä | 228 | %E4 | ä |
å | 229 | %E5 | å |
æ | 230 | %E6 | æ |
ç | 231 | %E7 | ç |
è | 232 | %E8 | è |
é | 233 | %E9 | é |
ê | 234 | %EA | ê |
ë | 235 | %EB | ë |
ì | 236 | %EC | ì |
í | 237 | %ED | í |
î | 238 | %EE | î |
ï | 239 | %EF | ï |
ð | 240 | %F0 | ð |
ñ | 241 | %F1 | ñ |
ò | 242 | %F2 | ò |
ó | 243 | %F3 | ó |
ô | 244 | %F4 | ô |
õ | 245 | %F5 | õ |
ö | 246 | %F6 | ö |
÷ | 247 | %F7 | ÷ |
ø | 248 | %F8 | ø |
ù | 249 | %F9 | ù |
ú | 250 | %FA | ú |
û | 251 | %FB | û |
ü | 252 | %FC | ü |
ý | 253 | %FD | ý |
þ | 254 | %FE | þ |
ÿ | 255 | %FF | ÿ |
#!C:/perl/bin/perl.exe -w # Please note that the taint switch (-T) is not used here as this is NOT # a CGI program. CGI.pm is merely used for its HTML generating functions. use strict; # This allows us to escape characters properly for query strings use URI::Escape; # This can be used to generate HTML character codes. use HTML::Entities; # Since this is a command line program, we don't want to be forced to # enter name=value pairs. Therefore, we use qw/:no_debug/ use CGI::Pretty qw/:no_debug/; $CGI::Pretty::INDENT = "\t"; my $q = CGI->new(); # The logic is simple: create the table data, read the source code, and use # them to create the web page. We could have done all of this without subroutines, # but this allows us to revisit this program easily in the future and extend its # functionality. For many, this is a matter of personal preference. # characters which must be encoded in query strings: my $cgi_chars = '\x00-\x29\x2b\x2c\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff'; # characters which often have their HTML character code equivalent used instead: my $html_chars = '\x00-\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff'; my $bit = 1; sub row { my $cell_method = shift; $q->Tr( { -align => 'right', -bgcolor => ('#FFFFFF','#CCCCCC')[ $bit ^= 1 ], # a flipping bit }, $q->$cell_method( \@_ ) ) } my $outfile = "appendix2.html"; open OUT, '>', $outfile or die "Error opening $outfile for writing: $!\n"; print OUT $q->table( row( 'th', # header row 'Symbol', 'ASCII Value', 'URL encoded', 'HTML code' ), map { my $char = chr $_; # The actual character my $symbol = encode_entities( $char, $html_chars ); # HTML code for web page my $escaped = uri_escape( $char, $cgi_chars ); # CGI representation my $html_code = encode_entities( $symbol ); # Re-encode HTML code so that it displays properly $escaped eq '%20' and $escaped .= ' or +'; # a space may be %20 or a + row( 'td', $_ < 33 ? ' ' : $symbol, $_, $escaped, $html_code ) } 0 .. 255 ); close OUT;