From: Mischa POSLAWSKY Date: Wed, 29 Dec 2021 18:35:36 +0000 (+0100) Subject: charset: compare unknown glyphs in custom tables X-Git-Tag: v1.13~35 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/38c0f94fbc07d23581704b72a7e6d3cbe4dfa96c charset: compare unknown glyphs in custom tables Ignore missing classes in Perl v5.28 for Unicode v13.0 legacy computing symbols, while keeping unassigned code points in unicode blocks (various gaps in Greek overview). --- diff --git a/charset-encoding.inc.pl b/charset-encoding.inc.pl index 2da7614..b534510 100644 --- a/charset-encoding.inc.pl +++ b/charset-encoding.inc.pl @@ -271,7 +271,8 @@ use utf8; $row->{endpoint} ||= ($block + 1 << 8) - 1; $block == ($row->{endpoint} >> 8) or undef $block; - $row->{table} = join '', map { chr } $row->{offset} .. $row->{endpoint}; + $row->{table} = join '', map { chr =~ s/\A\p{Unassigned}\z/�/r } + $row->{offset} .. $row->{endpoint}; utf8::upgrade($row->{table}); # prevent latin1 output $row->{endpoint} -= $row->{offset}; diff --git a/charset.plp b/charset.plp index 49f2d50..2257fb8 100644 --- a/charset.plp +++ b/charset.plp @@ -342,7 +342,7 @@ for my $row (@request) { $cp == ord $glyph ? 'l4' : $row->{parent} && $glyph eq Encode::decode($row->{parent}, pack 'C', $cp) ? 'l3' : - !$class ? undef : + !defined $cell ? undef : $visible->{$glyph} ? 'l2' : 'l1' );