use Encode for output.
authorimiyazaki <imiyazaki>
Wed, 8 Sep 2004 14:25:52 +0000 (14:25 +0000)
committerimiyazaki <imiyazaki>
Wed, 8 Sep 2004 14:25:52 +0000 (14:25 +0000)
chise2otf/chise2otf

index 60af335..b2a8355 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w -CID
+#!/usr/bin/perl -w -CSD
 
 use strict;
 use vars qw($opt_in_cs $opt_order $opt_kage $opt_replace
 
 use strict;
 use vars qw($opt_in_cs $opt_order $opt_kage $opt_replace
@@ -18,15 +18,18 @@ use vars qw($opt_in_cs $opt_order $opt_kage $opt_replace
 use Getopt::Long;
 use Fcntl ':flock';
 use utf8;
 use Getopt::Long;
 use Fcntl ':flock';
 use utf8;
+use Encode;
 use Chise_utils ':all';
 require 5.008;
 
 use Chise_utils ':all';
 require 5.008;
 
+binmode(STDOUT,":encoding(euc-jp)");
+
 # currently does not work, so...
 $opt_use_kage_for_Ext_B=0;
 
 my $makefonts="/usr/local/share/texmf/omega/ocp/chise_rqd/chise/makefonts.pl";
 my $exec_makefonts=0;
 # currently does not work, so...
 $opt_use_kage_for_Ext_B=0;
 
 my $makefonts="/usr/local/share/texmf/omega/ocp/chise_rqd/chise/makefonts.pl";
 my $exec_makefonts=0;
-my $geta=pack("S",8750|0x8080);
+my $geta='〓';
 
 &GetOptions("in=s"=>\$opt_in_cs,
            "order=s"=>\$opt_order,
 
 &GetOptions("in=s"=>\$opt_in_cs,
            "order=s"=>\$opt_order,
@@ -369,7 +372,7 @@ sub get_output_char{
        or $out_char=&get_char_attribute($char,'=jis-x0208-1983')
        or $out_char=&get_char_attribute($char,'=jis-x0208-1990')
       ){
        or $out_char=&get_char_attribute($char,'=jis-x0208-1983')
        or $out_char=&get_char_attribute($char,'=jis-x0208-1990')
       ){
-       return pack("S",$out_char|0x8080);
+       return $char;
     }else{
        foreach $out_cs (@order){
            if($out_cs eq 'UniJIS'
     }else{
        foreach $out_cs (@order){
            if($out_cs eq 'UniJIS'