sc: lotv patch v5.0.13 (2024-03-26)
[sheet.git] / charset-encoding.inc.pl
index ab0eeda85f7665e7569f38deefb58cc38a7ded4d..91b181a6b22a5063fdabfcf9b448f8c77a395779 100644 (file)
@@ -223,7 +223,7 @@ use utf8;
        'cp1026'       => {inherit => ['cp37' => '40']},
        'cp875'        => {inherit => ['cp37' => '30']},
 
-       legacy     => [qw( cp437 ATASCII PETSCII MSX ZX-Spectrum ANSEL )],
+       legacy     => [qw( cp437 gsm0338 ATASCII PETSCII MSX ZX-Spectrum ANSEL )],
        'petscii'      => {
                inherit => ['' => '40-7F+A0-BF'],
                table => [(map {chr} 0 .. 0x3F), qw(
@@ -333,56 +333,4 @@ use utf8;
                                ),
                ],
        },
-
-       ''             => {setup => sub {
-               my $row = shift;
-               $row->{offset} = delete $row->{startpoint};
-               $row->{set} = 'Unicode characters';
-               my $block = $row->{offset} >> 8;
-               $row->{endpoint} ||= ($block + 1 << 8) - 1;
-               $block == ($row->{endpoint} >> 8) or undef $block;
-
-               $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};
-
-               if (defined $block) {
-                       $row->{set} = sprintf 'Unicode block U+%02Xxx', $block;
-                       $row->{offset} %= 0x100;
-               }
-
-               return $row;
-       }},
-       u              => {setup => sub {
-               my $row = shift;
-               state $celldata = do 'charset-unicode.inc.pl'
-                       or Alert('Table data could not be read', $@ || $!);
-               $row->{cell} = $celldata;
-
-               $row->{endpoint} ||= 0x1FFF;
-               $row->{set} = 'Unicode ' . (
-                       $row->{startpoint} <  0x1000 && $row->{endpoint} < 0x1000 ? 'BMP' :
-                       $row->{startpoint} >= 0x1000 && $row->{endpoint} < 0x2000 ? 'SMP' :
-                       'allocations'
-               );
-               return $row;
-       }},
-       uu             => {setup => sub {
-               my $row = shift;
-               $row->{cell} = do 'charset-ucplanes.inc.pl'
-                       or Alert('Table data could not be read', $@ || $!);
-               $row->{endpoint} ||= 0x3FF;
-               $row->{set} = 'Unicode planes';
-               return $row;
-       }},
-       utf8           => {setup => sub {
-               my $row = shift;
-               $row->{set} = 'UTF-8';
-               $row->{cell} = do 'charset-utf8.inc.pl'
-                       or Alert('Table data could not be read', $@ || $!);
-               return $row;
-       }},
-       'utf-8'        => 'utf8',
 };