-my @chars = ((map {chr} ord '!' .. ord 'Z'), 'a'..'z');
-splice @chars, $_, 1, () for 2, 3-1, 5-2, 31-3; # remove character exceptions # $ & @
-print '<table>';
-print '<thead><tr><th> ';
-print "<th>$_" for @chars, '_';
-print '<tbody>';
-for my $c1 (@chars) {
- print "<tr><th>$c1";
- for my $c2 (@chars, '_') {
- my $mnem = $c1 . $c2;
- if (not defined $di->{$mnem}) {
- print '<td>';
- next;
- }
- my $chr = $di->{$mnem};
- my $glyph = chr $chr;
- utf8::upgrade($glyph); # prevent latin1 output
+my @chars = (
+ [qw{! " % ' ( ) * + , - . /}],
+ ['0'..'9'], [qw{: ; < = > ?}],
+ ['A'..'M'], ['N'..'Z'],
+ ['a'..'m'], ['n'..'z'],
+);
+my @chars2 = (['_'], @chars); # trailing character (extended set)
+
+print '<table class="glyphs dimap"><col>';
+print qq'<colgroup span="$_">' for map {scalar @$_} @chars2;
+print "</colgroup><col>\n";
+for my $section (qw{thead tfoot}) {
+ print "<$section><tr><th>↳";
+ print '<th>', quote($_) for map {@$_} @chars2;
+ print "<th> \n";
+}
+for my $c1group (@chars) {
+ print '<tbody>';
+ for my $c1 (@$c1group) {
+ print '<tr><th>', quote($c1);
+ for my $c2 (map {@$_} @chars2) {
+ my $mnem = $c1 . $c2;
+ if (not defined $di->{$mnem}) {
+ print '<td>';
+ next;
+ }
+ if (ref $di->{$mnem} ne 'ARRAY') {
+ printf '<td class="X Xr" title="%s">', quote($mnem);
+ next;
+ }
+ my ($codepoint, $name, $prop, $script, $string) = @{ $di->{$mnem} };