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;
} or warn "Failed importing html entities: $@";
my %diinc = (
- 'digraphs.inc.pl' => 'u-di',
+ 'data/digraphs-rfc.inc.pl' => 'u-di',
+ 'data/digraphs-shiar.inc.pl' => 'u-prop Xz',
);
for (keys %diinc) {
-e $_ or next;
while (my ($mnem, $cp) = each %$di) {
length $mnem == 2 or next; # limit to digraphs
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}->{$class}++;
+ $info{chr $cp}->{di} //= $mnem;
+ $info{chr $cp}->{class}->{$class}++;
}
}
}
# output perl code of hash
+say "# automatically generated by $0";
say 'use utf8;';
say '+{';
for my $cp (sort keys %info) {