From 4aed151cd144c6c74f28d537c9d8f0285e72fec3 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 27 Mar 2017 22:41:34 +0200 Subject: [PATCH] charset: warn about include errors --- charset.plp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/charset.plp b/charset.plp index 557c66f..734d227 100644 --- a/charset.plp +++ b/charset.plp @@ -62,7 +62,8 @@ my @request = map { elsif ($input eq 'U') { $row{table} = ' ' x 1024; $row{set} = 'Unicode planes'; - $row{cell} = do 'charset-ucplanes.inc.pl'; + $row{cell} = do 'charset-ucplanes.inc.pl' + or printf "

Table data could not be read: %s.

\n", $@ || $!; @nibble = (map { $_.0, $_.8 } 0 .. 7); $nibsize = 8; } @@ -70,12 +71,14 @@ my @request = map { if ($row{set} eq 'Internal') { $row{table} = ' ' x ($endpoint < 255 ? 640 : 8192); $row{set} = 'Unicode BMP'; - $row{cell} = do 'charset-unicode.inc.pl'; + $row{cell} = do 'charset-unicode.inc.pl' + or printf "

Table data could not be read: %s.

\n", $@ || $!; } elsif ($row{set} eq 'utf-8-strict') { $row{table} = undef; $row{set} = 'UTF-8'; - $row{cell} = do 'charset-utf8.inc.pl'; + $row{cell} = do 'charset-utf8.inc.pl' + or printf "

Table data could not be read: %s.

\n", $@ || $!; } else { $row{table} = decode($row{set}, pack 'C*', $row{offset} .. $endpoint); -- 2.30.0