1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 03:32:16 -05:00

Update our emoji implementation to support docomo, softbank and kddi

(with the exception of 3 kddi glyphs that overlap with softbank).

As of this commit, emoji sent by iPhone users are visible in K-9
This commit is contained in:
Jesse Vincent 2010-08-12 02:22:35 +00:00
parent d123aa2a39
commit a0238904b6
2 changed files with 1824 additions and 571 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,30 @@
use warnings;
use strict;
my $emoji = do 'Emoticon.pl';
use YAML;
my %codepoints;
for my $carrier qw(docomo softbank kddi) {
print "\t\t// Emoji for $carrier\n";
for $codepoint (keys %{$emoji->{$carrier}}) {
print "\t\tcase 0x$codepoint: \n";
print "\t\t\t".'buf.append("<img src=\"file:///android_asset/emoticons/'.$emoji->{$carrier}->{$codepoint}.'.gif\" alt=\"'.$emoji->{$carrier}->{$codepoint}.'\">'.");\n\t\t\tbreak;\n";
print " // These emoji codepoints are generated by tools/make_emoji in the K-9 source tree\n";
print " // The spaces between the < and the img are a hack to avoid triggering \n";
print " // K-9's 'load images' button\n\n";
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";
print " ".'buff.append("< img src=\"file:///android_asset/emoticons/'.$emoji->{$carrier}->{$codepoint}.'.gif\" alt=\"'.$emoji->{$carrier}->{$codepoint}.'\" />'."\");\n";
print " break;\n";
}