Show
Ignore:
Timestamp:
01/25/08 00:40:59 (10 months ago)
Author:
tokuhirom
Message:

merge Encode::JP::Mobile::Character branch to trunk.

Location:
lang/perl/Encode-JP-Mobile/trunk/tools
Files:
2 modified
1 moved

Legend:

Unmodified
Added
Removed
  • lang/perl/Encode-JP-Mobile/trunk/tools/make-convert-map.pl

    r5243 r5448  
    3939        next unless $line =~ /^%/; 
    4040        chomp $line; 
     41        $line = decode 'cp932', $line; 
    4142 
    4243        $file eq 'emoji_i2es.txt' && do { 
     
    6465    if ($key =~ /^%/) { 
    6566        $key =~ s/(%[^%]+%)/$no2uni->{$1}/ge; 
    66         return $key; 
     67        return +{ type => 'pictogram', unicode => $key }; 
    6768    } else { 
    68         return; 
     69        return +{ type => 'name', unicode => $key }; 
    6970    } 
    7071} 
  • lang/perl/Encode-JP-Mobile/trunk/tools/make-utf8-ucm.pl

    r5259 r5448  
    3636 
    3737                for my $srcuni (sort keys %{$map->{$from}}) { 
    38                     my $dstuni = $map->{$from}{$srcuni}{$to} or next; 
    39                     printf {$fh} "<U%s> %s |1 # %s\n", $srcuni, unihex2utf8hex($dstuni), comment_for($from); 
     38                    my $dstuni = $map->{$from}->{$srcuni}->{$to} or next; 
     39                    next unless $dstuni->{type} eq 'pictogram'; 
     40                    printf {$fh} "<U%s> %s |1 # %s\n", $srcuni, unihex2utf8hex($dstuni->{unicode}), comment_for($from); 
    4041                } 
    4142            } 
  • lang/perl/Encode-JP-Mobile/trunk/tools/yaml2perl.pl

    r4874 r5448  
    99$Data::Dumper::Terse++; 
    1010 
    11 for my $carrier (qw/docomo softbank kddi/) { 
    12     my $src_fname = catfile($FindBin::Bin, '..', 'dat', "${carrier}-table.yaml"); 
    13     my $dst_fname = catfile($FindBin::Bin, '..', 'dat', "${carrier}-table.pl"); 
     11die "Usage: $0 hoge.yaml hoge.pl" unless @ARGV==2; 
     12my ($src, $dst) = @ARGV; 
    1413 
    15     open my $fh, '>', $dst_fname or die $!; 
    16     print $fh Dumper(YAML::LoadFile($src_fname)); 
    17     close $fh; 
    18 } 
     14open my $fh, '>', $dst or die $!; 
     15print $fh Dumper(YAML::LoadFile($src)); 
     16close $fh; 
    1917