charset: ebcdic inheritance
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 8 Apr 2017 14:10:14 +0000 (16:10 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 24 Apr 2017 23:51:41 +0000 (01:51 +0200)
charset.plp

index 51c391c..7dc1aee 100644 (file)
@@ -32,8 +32,8 @@ sub tabinput {
 
        state $ALIAS = {
                default    => [qw( unicode+0-639 utf-8 iso-8859-1 iso-8859-15 cp1252 cp437 cp850 )],
-               us         => [qw( cp437 cp863 AdobeStandardEncoding gsm0338 )],
-               ebcdic     => [qw( cp37 cp500 cp875 cp1026 cp1047 posix-bc )],
+               us         => [qw( cp437 cp863 gsm0338 AdobeStandardEncoding )],
+               ebcdic     => [qw( cp37 cp500 cp1047 posix-bc cp1026 cp875 )],
                iso        => [map {"iso-8859-$_"} 1 .. 11, 13 .. 16],
                dos        => [qw( cp437 cp865 cp861 cp860 cp863 cp850 cp857 cp852 cp775
                                   cp737 cp869 cp866 cp855 cp862 cp864 )],
@@ -144,6 +144,14 @@ sub tabinput {
                        'MacHebrew'   => ['iso-8859-8' => '128', 'MacRoman' => '128-143+160'], # partial ascii
                        'MacArabic'   => ['iso-8859-6' => '128', 'cp864' => '128', 'MacRoman' => '128'], #TODO: multiple parents
                        'MacFarsi'    => ['MacArabic' => '176-191', 'MacRoman' => '128'],
+
+                       'cp37'        => ['posix-bc' => '0'],
+                       'posix-bc'    => ['cp1047' => '64'],
+                       'cp500'       => ['cp37' => '64-95+176-191'],
+                       'cp1047'      => ['cp37' => '16-95+160-191'], #TODO: gap at 3/4
+                       'cp1026'      => ['cp37' => '64'],
+                       'cp875'       => ['cp37' => '48'],
+
                };
 
                my @parents = @{ $INHERIT->{$input} || [] };