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 71ba2ba..c1fd74c 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 7f19bc1..5b415ee 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} = [