2010-08-11 22:22:35 -04:00
|
|
|
use warnings;
|
|
|
|
use strict;
|
2010-08-11 22:22:15 -04:00
|
|
|
my $emoji = do 'Emoticon.pl';
|
|
|
|
use YAML;
|
|
|
|
|
2010-08-11 22:22:35 -04:00
|
|
|
my %codepoints;
|
2010-08-11 22:22:15 -04:00
|
|
|
|
|
|
|
for my $carrier qw(docomo softbank kddi) {
|
|
|
|
|
|
|
|
|
2010-08-11 22:22:35 -04:00
|
|
|
print " // These emoji codepoints are generated by tools/make_emoji in the K-9 source tree\n";
|
2010-08-15 10:52:59 -04:00
|
|
|
print "\n";
|
2010-08-11 22:22:35 -04:00
|
|
|
for my $codepoint (keys %{$emoji->{$carrier}}) {
|
|
|
|
|
|
|
|
if (defined $codepoints{$codepoint}) {
|
|
|
|
print " // Skipping $carrier codepoint $codepoint ".$emoji->{$carrier}->{$codepoint}."\n";
|
|
|
|
print " // It conflicts with an earlier definition from another carrier:\n";
|
|
|
|
print " // ".$codepoints{$codepoint}."\n\n";
|
|
|
|
next;
|
|
|
|
} else {
|
|
|
|
$codepoints{$codepoint} = "$carrier ".$emoji->{$carrier}->{$codepoint};
|
|
|
|
}
|
|
|
|
|
|
|
|
print " case 0x$codepoint: //$carrier ".$emoji->{$carrier}->{$codepoint}."\n";
|
2010-08-15 10:52:59 -04:00
|
|
|
print " ".'buff.append("<img src=\"file:///android_asset/emoticons/'.$emoji->{$carrier}->{$codepoint}.'.gif\" alt=\"'.$emoji->{$carrier}->{$codepoint}.'\" />'."\");\n";
|
2010-08-11 22:22:35 -04:00
|
|
|
print " break;\n";
|
2010-08-11 22:22:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|