unicode: distinguish proposed digraphs again
[sheet.git] / tools / convert-unicode.pl
index 98c8ca77e3ec35b1525d056ec49e9a301be6a412..51e27cd20c27a156f99070f95dc3e59846d656e2 100755 (executable)
@@ -47,9 +47,14 @@ for (keys %diinc) {
        my $di = do $_ or die "Error reading digraphs file $_: ", $@ || $!;
        while (my ($mnem, $cp) = each %$di) {
                length $mnem == 2 or next;  # limit to digraphs
-               $cp = chr $cp->[0] if ref $cp;  # old style array
+               my $class = $diinc{$_};
+               if (ref $cp) {
+                       # old style array
+                       $class = 'u-prop' if $cp->[2] and $cp->[2] =~ m/\bXz\b/;
+                       $cp = chr $cp->[0];
+               }
                $info{$cp}->{di} //= $mnem;
-               $info{$cp}->{class}->{$_}++ for $diinc{$_};
+               $info{$cp}->{class}->{$class}++;
        }
 }