add '=>ucs' etc. to use unified characters.
authorimiyazaki <imiyazaki>
Fri, 10 Oct 2003 12:24:51 +0000 (12:24 +0000)
committerimiyazaki <imiyazaki>
Fri, 10 Oct 2003 12:24:51 +0000 (12:24 +0000)
chise2otf/chise2otf

index 0b8207d..f0bd571 100755 (executable)
@@ -93,7 +93,7 @@ if(defined($opt_order)){
        @order=map {$order{$_}} @order;
     }else{
        print STDERR "Invalid option!\n";
-       print $usage;
+       print STDERR $usage;
        exit 1;
     }
 }
@@ -298,25 +298,37 @@ sub get_output_char{
            if($out_cs eq 'UniJIS'
               and &get_char_attribute($char,"adobe-unijis-utf16-h")){
                if($out_char_id=&get_char_attribute($char,'=ucs@jis')
-                  or $out_char_id=&get_char_attribute($char,'=ucs')){
+                  or $out_char_id=&get_char_attribute($char,'=ucs')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs@jis')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs')
+                  ){
                    return "\\UTF{".sprintf("%X",$out_char_id)."}";
                }
            }elsif($out_cs eq 'UniGB'
                   and &get_char_attribute($char,"adobe-unigb-ucs2-h")){
                if($out_char_id=&get_char_attribute($char,'=ucs@gb')
-                  or $out_char_id=&get_char_attribute($char,'=ucs')){
+                  or $out_char_id=&get_char_attribute($char,'=ucs')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs@gb')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs')
+                  ){
                    return "\\UTFC{".sprintf("%X",$out_char_id)."}";
                }
            }elsif($out_cs eq 'UniCNS'
                   and &get_char_attribute($char,"adobe-unicns-ucs2-h")){
                if($out_char_id=&get_char_attribute($char,'=ucs@cns')
-                  or $out_char_id=&get_char_attribute($char,'=ucs')){
+                  or $out_char_id=&get_char_attribute($char,'=ucs')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs@cns')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs')
+                  ){
                    return "\\UTFT{".sprintf("%X",$out_char_id)."}";
                }
            }elsif($out_cs eq 'UniKS'
                   and &get_char_attribute($char,"adobe-uniks-ucs2-h")){
                if($out_char_id=&get_char_attribute($char,'=ucs@ks')
-                  or $out_char_id=&get_char_attribute($char,'=ucs')){
+                  or $out_char_id=&get_char_attribute($char,'=ucs')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs@ks')
+                  or $out_char_id=&get_char_attribute($char,'=>ucs')
+                  ){
                    return "\\UTFK{".sprintf("%X",$out_char_id)."}";
                }
            }elsif($out_cs eq 'GT'){