charset: common endpoint fallback
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 22 Apr 2017 11:46:21 +0000 (13:46 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 25 May 2017 20:12:49 +0000 (22:12 +0200)
charset-encoding.inc.pl
charset.plp

index 71ba2bae277446e4a68666dab5081b1cdc3875ef..c1fd74c8936ca6d33159c69ee6fb9eff4b51452c 100644 (file)
@@ -188,7 +188,6 @@ use utf8;
                $row->{set} = 'UTF-8';
                $row->{cell} = do 'charset-utf8.inc.pl'
                        or Alert('Table data could not be read', $@ || $!);
-               $row->{endpoint} = 0xFF;
                return $row;
        }},
        'utf-8'        => 'utf8',
index 7f19bc183e6fb02abd1d91622041cf7f75479905..5b415eec8387bb6cf6b76e81f7ae3c52d9093f5e 100644 (file)
@@ -147,11 +147,11 @@ sub tabinput {
                eval { $charset->{setup}->(\%row) }
                        or Alert("Incomplete setup of $input", $@);
        }
+       $row{endpoint} ||= 0xFF;
 
        if ($row{set}) {}
        elsif ($row{set} = Encode::resolve_alias($input)) {
                $row{offset} = delete $row{startpoint};
-               $row{endpoint} ||= 0xFF;
                if ($row{set} eq 'MacHebrew' or $row{set} eq 'MacThai') {
                        # array of possibly multiple characters per code point
                        $row{table} = [