Encode::JP::Mobile::Charnames - define pictogram names for "\N{named}" string literal escapes
use Encode::JP::Mobile::Charnames; print "\N{DoCoMo Beer} \N{DoCoMo ファーストフード}\n"; Encode::JP::Mobile::Charnames::unicode2name(0xE672); # => 'ビール' Encode::JP::Mobile::Charnames::unicode2name_en(0xE672); # => 'Beer' Encode::JP::Mobile::Charnames::vianame('DoCoMo Beer'); # => 0xE672
Encode::JP::Mobile::Charnames::unicode2name(0xE672); # => 'ビール'
unicode から日本語の名前を得ます。
このメソッドは KDDI-cp932 と KDDI-Auto のどちらの Unicode が引数として渡されても名前を返します。
ただし、現在の仕様では、SoftBank と au の重複領域では SoftBank が優先されます。 シェアを考えれば KDDI の方を優先するべきですが、KDDI の方は KDDI-CP932 ではなく KDDI-Auto を使うという代替手法があるので、このような仕様となっております。
Encode::JP::Mobile::Charnames::unicode2name_en(0xE672); # => 'Beer'
Unicode から英語の名前を得ます。
キャリヤから公式に英語の絵文字名称が付与されているのは docomo だけであるため、KDDI, SoftBank については一度 DoCoMo 絵文字にマッピングして得られた文字の名前を利用しています。
Encode::JP::Mobile::Charnames::vianame('DoCoMo Beer'); # => 0xE672
名前から絵文字の Unicode を得ます
Tokuhiro Matsuno <tokuhirom ta mfac ・ jp>
Encode::JP::Mobile, charnames
To install Encode::JP::Mobile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Encode::JP::Mobile
CPAN shell
perl -MCPAN -e shell install Encode::JP::Mobile
For more information on module installation, please visit the detailed CPAN module installation guide.