digraphs: proposals for common formatting control characters
[sheet.git] / tools / mkcharinfo
index c6c890011abb33a33a873de67c9edaa4a40c9a59..ef1e2150c535892c30afe789580a549f759c2203 100755 (executable)
@@ -11,9 +11,13 @@ use Data::Dump 'pp';
 our $VERSION = '1.00';
 
 my %info = (
+       # prepare presentational string for some control(lish) entries
        "\xAD"     => {string => '-'},
        "\x{200E}" => {string => '→'},
        "\x{200F}" => {string => '←'},
+       "\x{200B}" => {string => '␣'},
+       "\x{200C}" => {string => '|'}, # ISO-9995-7-081 lookalike (alt: ∣ ⊺ ⟙)
+       "\x{200D}" => {string => '⁀'}, # join (alt: ∤ |ͯ ⨝)
 );
 $info{chr $_} //= {} for 32 .. 126;
 
@@ -105,7 +109,9 @@ for my $chr (keys %info) {
                                ? '<'.$info->{unicode10}.'>'  # the old name was much more useful
                                : sprintf('<control U+%04X>', $cp);  # at least identify by value
                        # show descriptive symbols instead of control chars themselves
-                       $info->{string} = $cp < 32 ? chr($cp + 0x2400) : chr(0xFFFD);
+                       $info->{string} = $cp < 32   ? chr($cp + 0x2400) :
+                                         $cp == 127 ? chr(0x2421) :
+                                                      chr(0xFFFD);
                }
        }