NAME

Encode::JP::Emoji::Fallback - Emoji fallback functions

SYNOPSIS

use Encode;
use Encode::JP::Emoji;
use Encode::JP::Emoji::Fallback;

# DoCoMo Shift_JIS <SJIS+F89F> octets to DoCoMo fallback text "晴れ"
my $sun = "\xF8\x9F";
Encode::from_to($sun, 'x-sjis-emoji-docomo', 'x-sjis-e4u-none', FB_DOCOMO_TEXT());

# KDDI UTF-8 <U+E598> octets to Google fallback text "霧"
my $fog = "\xEE\x96\x98";
Encode::from_to($fog, 'x-utf8-e4u-kddi', 'x-utf8-e4u-none', FB_GOOGLE_TEXT());

# SoftBank UTF-8 <U+E524> string to SoftBank fallback text "ハムスター" on encoding
my $hamster = "\x{E524}";
my $softbank = Encode::encode('x-sjis-e4u-none', $hamster, FB_SOFTBANK_TEXT());

# Google UTF-8 <U+FE1C1> octets to Google fallback text "クマ" on decoding
my $bear = "\xF3\xBE\x87\x81";
my $google = Encode::decode('x-utf8-e4u-none', $bear, FB_GOOGLE_TEXT());

DESCRIPTION

This module exports the following fallback functions which are used with x-sjis-e4u-none and x-utf8-e4u-none encodings which rejects any emojis.

FB_DOCOMO_TEXT()

This returns emoji name defined by DoCoMo. Note that this works only for DoCoMo's private emoji code points: U+E63E ... U+E757.

FB_KDDI_TEXT()

This returns emoji name defined by KDDI. Note that this works only for KDDI's private emoji code points: U+E468 ... U+EB8E.

FB_SOFTBANK_TEXT()

This returns emoji name defined by SoftBank. Note that this works only for SoftBank's private emoji code points: U+E001 ... U+E53E.

FB_GOOGLE_TEXT()

This returns emoji name defined by emoji4unicode project on Google Code. Note that this works only for Google's private emoji code points: U+FE000 ... U+FEEA0.

FB_UNICODE_TEXT()

This will return character name defined on the Unicode Standard. Note that this works only for emojis which has a standard code point.

FB_DOCOMO_HTML($format)

These return HTML string which has an img element instead of emoji name. You need to specify formatting string for sprintf(). Note that this works only for DoCoMo's private emoji code points but provides Google's private code point for sprintf()'s first argument.

FB_KDDI_HTML($format)

This works only for KDDI's private emoji code points but provides Google's private code point for sprintf().

FB_SOFTBANK_HTML($format)

This works only for SoftBank's private emoji code points but provides Google's private code point for sprintf().

FB_GOOGLE_HTML($format)

This works only for Google's private emoji code points.

FB_UNICODE_HTML($format)

This works only for emojis which has a standard code point.

AUTHOR

Yusuke Kawasaki, http://www.kawa.net/

SEE ALSO

Encode::JP::Emoji

COPYRIGHT

Copyright 2009 Yusuke Kawasaki, all rights reserved.