tools/mkcharinfo: comment alternative nbsp stringification
[sheet.git] / tools / mkcharinfo
index dfcd13de1181478bf9274c29932226a64e17e7c8..988d7b151ec86b4835849d124745fbb8373ec123 100755 (executable)
@@ -8,14 +8,14 @@ no if $] >= 5.018, warnings => 'experimental::smartmatch';
 use open OUT => ':utf8', ':std';
 use Data::Dump 'pp';
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 my %info = (
        # prepare presentational string for some control(lish) entries
        "\xAD"     => {string => '-'},
        "\x{200E}" => {string => '→'},
        "\x{200F}" => {string => '←'},
-       "\x{200B}" => {string => '␣'},
+       "\x{200B}" => {string => '␣'}, # nbsp: ~ in TeX
        "\x{200C}" => {string => '|'}, # ISO-9995-7-081 lookalike (alt: ∣ ⊺ ⟙)
        "\x{200D}" => {string => '⁀'}, # join (alt: ∤ |ͯ ⨝)
 );
@@ -58,8 +58,8 @@ for (sort keys %diinc) {
                my $cp = $di->{$mnem};
                length $mnem == 2 or next;  # limit to digraphs
                my $class = $diinc{$_};
-               $info{chr $cp}->{di} //= $mnem;
-               $info{chr $cp}->{class}->{$class}++;
+               $info{$cp}->{di} //= $mnem;
+               $info{$cp}->{class}->{$class}++;
        }
 }