2795
|
1 |
#!/usr/local/dist/bin/perl
|
1826
|
2 |
#
|
|
3 |
# codetable.pl
|
|
4 |
# Franz Regensburger <regensbu@informatik.tu-muenchen.de>
|
|
5 |
# 21.3.95
|
|
6 |
#
|
|
7 |
# last changed:
|
|
8 |
#
|
|
9 |
# print the extended ascii-code table
|
|
10 |
# leave out unprintable characters.
|
|
11 |
#
|
|
12 |
# needs an 8bit terminal for output
|
|
13 |
|
|
14 |
$index = 0;
|
|
15 |
while ($index <= 255) {
|
|
16 |
if ( $index < 32 || (126 < $index && $index < 161)){# unprintable
|
|
17 |
# if ( $index < 32){# unprintable
|
|
18 |
$ascii_code = 32;}
|
|
19 |
else { $ascii_code = $index;}
|
|
20 |
|
|
21 |
printf( "%-3o %-3d %-2x %c \n",
|
|
22 |
$index,
|
|
23 |
$index,
|
|
24 |
$index,
|
|
25 |
$ascii_code);
|
|
26 |
|
|
27 |
$index += 1;
|
|
28 |
}
|