NAME

Encode::JP::Emoji::FB_EMOJI_TEXT - Emoji fallback functions

SYNOPSIS

use Encode;
use Encode::JP::Emoji;
use Encode::JP::Emoji::FB_EMOJI_TEXT;

# DoCoMo Shift_JIS <SJIS+F89F> octets to fallback to DoCoMo name "[晴れ]"
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 fallback to Google name "[霧]"
my $fog = "\xEE\x96\x98";
Encode::from_to($fog, 'x-utf8-e4u-kddiapp', 'x-utf8-e4u-none', FB_GOOGLE_TEXT());

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

# Google UTF-8 <U+FE1C1> octets to fallback to Google name "[クマ]"
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 would be 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 accepts only DoCoMo's private emoji code points.

Encode::from_to($html, 'x-utf8-emoji-docomo', 'x-utf8-emoji-none', FB_DOCOMO_TEXT());

FB_KDDIAPP_TEXT()

This returns emoji name defined by KDDI. Note that this accepts only KDDI's private emoji code points.

Encode::from_to($html, 'x-sjis-emoji-kddiapp', 'x-sjis-emoji-none', FB_KDDIAPP_TEXT());

FB_KDDIWEB_TEXT()

This returns emoji name defined by KDDI. Note that this accepts only undocumented version of KDDI's private emoji code points.

Encode::from_to($html, 'x-utf8-emoji-kddiweb', 'x-utf8-emoji-none', FB_KDDIWEB_TEXT());

See http://subtech.g.hatena.ne.jp/miyagawa/20071112/1194865208 for more detail.

FB_SOFTBANK_TEXT()

This returns emoji name defined by SoftBank. Note that this accepts only SoftBank's private emoji code points.

Encode::from_to($html, 'x-sjis-emoji-softbank3g', 'x-sjis-emoji-none', FB_SOFTBANK_TEXT());

FB_GOOGLE_TEXT()

This returns emoji name defined by emoji4unicode project on Google Code. Note that this accepts only Google's private emoji code points.

Encode::from_to($html, 'x-utf8-e4u-google', 'x-utf8-e4u-none', FB_GOOGLE_TEXT());

FB_UNICODE_TEXT()

This will return character name defined on the Unicode Standard. Note that this accepts only emojis of standard code points.

Encode::from_to($html, 'x-utf8-e4u-unicode', 'x-utf8-e4u-none', FB_UNICODE_TEXT());

FB_EMOJI_TEXT()

This accepts all emoji code points above for ease of use. Note that SoftBank is prior to KDDIapp in their conflicts code points.

AUTHOR

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

SEE ALSO

Encode::JP::Emoji

COPYRIGHT

Copyright 2009 Yusuke Kawasaki, all rights reserved.