Changeset 5328

Show
Ignore:
Timestamp:
01/23/08 10:00:44 (5 years ago)
Author:
miyagawa
Message:

print compatible table

Files:
1 modified

Legend:

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

    r5327 r5328  
    1414 
    1515my @table; 
     16my %conv; 
    1617for (split /\n/, $text) { 
    1718    next unless /^\d/; 
     
    3132    for my $c ( qw( softbank kddi docomo )) { 
    3233        warn "[$c] $_" unless defined $map{$c}; 
     34        my $key = $c eq 'kddi' ? 'unicode_auto' : 'unicode'; 
    3335        if ($map{$c} =~ m!/!) { 
    3436            my @code = split '/', $map{$c}; 
    35             $map{$c} = join " ", map $from_number->{$c}{$_}{unicode}, @code; 
     37            $map{$c} = join "", map $from_number->{$c}{$_}{$key}, @code; 
    3638        } else { 
    3739            my $info = $from_number->{$c}{$map{$c}}; 
    3840            if ($info) { 
    39                 $map{$c} = $info->{unicode}; 
     41                $map{$c} = $info->{$key}; 
    4042            } elsif ($map{$c} ne '〓' && $map{$c} !~ /^\[/) { 
    4143                warn "$c: $map{$c}"; 
     
    4547 
    4648    push @table, \%map; 
     49    $conv{$map{softbank}} = { 
     50        kddi => $map{kddi}, 
     51        docomo => $map{docomo}, 
     52    }; 
    4753} 
    4854 
    4955binmode STDOUT, ":utf8"; 
    50 print Dump \@table; 
     56#print Dump \@table; 
     57print Dump \%conv; 
    5158 
    5259sub setup_table {