Yusuke Kawasaki > Encode-JP-Emoji-FB_EMOJI_TYPECAST > Encode::JP::Emoji::FB_EMOJI_TYPECAST

Download:
Encode-JP-Emoji-FB_EMOJI_TYPECAST-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Encode::JP::Emoji::FB_EMOJI_TYPECAST - Emoji fallback for TypeCast emoji images

SYNOPSIS ^

    use Encode;
    use Encode::JP::Emoji;
    use Encode::JP::Emoji::FB_EMOJI_TYPECAST;

    my $image_base = 'http://example.com/images/emoticons/';
    $Encode::JP::Emoji::FB_EMOJI_TYPECAST::IMAGE_BASE = $image_base;

    # DoCoMo Shift_JIS <SJIS+F89F> octets
    # <img src="http://example.com/images/emoticons/sun.gif" alt="[晴れ]" class="e" />
    my $sun = "\xF8\x9F";
    Encode::from_to($sun, 'x-sjis-emoji-docomo', 'x-sjis-emoji-none', FB_EMOJI_TYPECAST());

    # KDDI(web) Shift_JIS <SJIS+F3A5> octets
    # <img src="http://example.com/images/emoticons/kissmark.gif" alt="[口]" class="e" />
    my $mouse = "\xF3\xA5";
    Encode::from_to($mouse, 'x-sjis-emoji-kddiweb', 'x-sjis-emoji-none', FB_EMOJI_TYPECAST());

    # SoftBank UTF-8 <U+E20C> string
    # <img src="http://example.com/images/emoticons/heart.gif" alt="[ハート]" class="e" />
    my $heart = "\x{E20C}";
    $heart = Encode::encode('x-sjis-e4u-none', $heart, FB_EMOJI_TYPECAST());

    # Google UTF-8 <U+FE983> octets
    # <img src="http://example.com/images/emoticons/beer.gif" alt="[ビール]" class="e" />
    my $beer = "\xF3\xBE\xA6\x83";
    $beer = Encode::decode('x-utf8-e4u-none', $beer, FB_EMOJI_TYPECAST());

DESCRIPTION ^

This module exports the following fallback function. Use this with x-sjis-e4u-none and x-utf8-e4u-none encodings which rejects any emojis.

FB_EMOJI_TYPECAST()

This function returns an img element for PC to display emoji images. Having conflicts with SoftBank encoding, KDDI(app) encoding is NOT recommended.

$Encode::JP::Emoji::FB_EMOJI_TYPECAST::IMAGE_BASE

This variable sets base URL to TypeCast emoji files. Download their emoticons.zip archive package from http://start.typepad.jp/typecast/.

Image files on Google Code Project Hosting, http://typecastmobile.googlecode.com/svn/trunk/static/images/emoticons/, is directly used by default.

TypeCast Emoji Icon Images by Six Apart Ltd is licensed under a Creative Commons Attribution 2.1 Japan License. Permissions beyond the scope of this license may be available at http://start.typepad.jp/typecast/.

LINKS ^

AUTHOR ^

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

SEE ALSO ^

Encode::JP::Emoji

COPYRIGHT ^

Copyright 2009 Yusuke Kawasaki, all rights reserved.

syntax highlighting: