From: Mischa POSLAWSKY Date: Tue, 2 Jun 2009 10:30:24 +0000 (+0000) Subject: charset: ucd fallback for undigraphed characters X-Git-Tag: v1.3~111 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/66b588e944657d76b8eafab015b789f9341c9c00 charset: ucd fallback for undigraphed characters --- diff --git a/charset.plp b/charset.plp index bc2a1ea..f9a773a 100644 --- a/charset.plp +++ b/charset.plp @@ -140,6 +140,11 @@ for my $row (@request) { if (defined (my $mnem = $di{ord $glyph})) { $info = $diinfo->{$mnem}; } + else { + require Unicode::UCD; + my $fullinfo = Unicode::UCD::charinfo(ord $glyph); + $info = [@$fullinfo{qw/code name category script string/}] if $fullinfo; + } my ($codepoint, $name, $prop, $script, $string) = @$info; $glyph = quote($string || $glyph);