Append Unicode version data as .u-v00, currently unused.
digraphs.inc.pl: data/rfc1345.txt
tools/mkdigraphlist data/rfc1345.txt >$@
digraphs.inc.pl: data/rfc1345.txt
tools/mkdigraphlist data/rfc1345.txt >$@
-unicode-char.inc.pl: digraphs.inc.pl
+unicode-char.inc.pl: digraphs.inc.pl unicode-age.inc.pl
tools/mkcharinfo >$@
ttfsupport:
tools/mkcharinfo >$@
ttfsupport:
$input =~ s/^\\//; # escaped char
($cell, $title, my $class, $mnem, $entity) = $self->glyphs_html($input);
$input =~ s/^\\//; # escaped char
($cell, $title, my $class, $mnem, $entity) = $self->glyphs_html($input);
+ my $codepoint = ord(substr $input, 0, 1);
if ($self->{style} eq 'univer') {
if ($input =~ /\p{age=unassigned}/) {
# check include for assignments after unicode 6.0 (perl v5.14)
state $agemap = do 'unicode-age.inc.pl';
if ($self->{style} eq 'univer') {
if ($input =~ /\p{age=unassigned}/) {
# check include for assignments after unicode 6.0 (perl v5.14)
state $agemap = do 'unicode-age.inc.pl';
- my $version = $agemap->{ord $input};
+ my $version = $agemap->{$codepoint};
push @class, $version ? 'l2' : 'l1';
}
elsif ($input =~ /^\p{in=1.1}*$/) {
push @class, $version ? 'l2' : 'l1';
}
elsif ($input =~ /^\p{in=1.1}*$/) {
- my $codepoint = ord(substr $input, 0, 1);
if ($codepoint <= 0xFF) {
push @class, 'l3', 'u-lat1'; # latin1
}
if ($codepoint <= 0xFF) {
push @class, 'l3', 'u-lat1'; # latin1
}
+eval {
+ # read introducing unicode versions for known characters
+ my $agemap = do 'unicode-age.inc.pl' or die $@ || $!;
+ for my $chr (keys %info) {
+ my $version = $agemap->{ord $chr} or next;
+ $info{$chr}->{class}->{'u-v'.$version}++
+ }
+ 1;
+} or warn "Failed including unicode version data $@";
+
for my $chr (keys %info) {
my $cp = ord $chr;
# attempt to get unicode character information
for my $chr (keys %info) {
my $cp = ord $chr;
# attempt to get unicode character information
|| { block => '?', category => 'Xn', name => '', script => '' }
} or next;
|| { block => '?', category => 'Xn', name => '', script => '' }
} or next;
- $info->{$_} = $info{$chr}->{$_} for qw(di html class string);
+ $info->{$_} = $info{$chr}->{$_} for keys %{ $info{$chr} };
# categorise by unicode types and writing script
$info->{class}->{$_}++ for $info->{category};
# categorise by unicode types and writing script
$info->{class}->{$_}++ for $info->{category};