Created
December 26, 2009 17:41
-
-
Save tmtysk/263992 to your computer and use it in GitHub Desktop.
emoji4unicode のデータと Unicode::Emoji::E4U を使って、SoftBank の SJIS-Unicode 変換テーブル(jpmobileフォーマット)を作成する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Unicode::Emoji::E4U; | |
binmode(STDOUT, ":utf8"); | |
my $e4u = Unicode::Emoji::E4U->new; | |
# fetch data files from Google Code (default) | |
$e4u->datadir('http://emoji4unicode.googlecode.com/svn/trunk/data/'); | |
my $softbank = $e4u->softbank; # Unicode::Emoji::Google instance | |
print "Jpmobile::Emoticon::SOFTBANK_SJIS_TO_UNICODE = {\n"; | |
foreach $e (@{$softbank->list}) { | |
my $se = $e->softbank_emoji; | |
print " 0x", uc(unpack("H*", $se->cp932_octets)), " => 0x", $e->unicode, ",\n"; | |
} | |
print "}\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment