NAME

HTML::Entities::ImodePictogram - i-modeÍѳ¨Ê¸»ú¤Î¥¨¥ó¥³¡¼¥É/¥Ç¥³¡¼¥É

SYNOPSIS

use HTML::Entities::ImodePictogram;

$html      = encode_pictogram($rawtext);
$rawtext   = decode_pictogram($html);
$cleantext = remove_pictogram($rawtext);

use HTML::Entities::ImodePictogram qw(find_pictogram);

$num_found = find_pictogram($rawtext, \&callback);

DESCRIPTION

HTML::Entities::ImodePictogram ¤Ï¡¢ Shift_JIS ¥×¥é¥¤¥Ù¡¼¥ÈÎΰè¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¡¢i-modeÍѳ¨Ê¸»ú¤ò½èÍý¤¹¤ë¥â¥¸¥å¡¼¥ë¤Ç¤¹¡£

i-modeÍѳ¨Ê¸»ú¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢http://www.nttdocomo.co.jp/i/tag/emoji/index.html ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

FUNCTIONS

¤³¤Î¥â¥¸¥å¡¼¥ë¤Î¤¹¤Ù¤Æ¤Î´Ø¿ô¤Ç¤Ï¡¢Æþ½ÐÎϤÎʸ»úÎó¤Ï Shift_JIS ¤Ç¥¨¥ó¥³¡¼¥É¤µ¤ì¤Æ¤¤¤ë¤ÈÁÛÄꤷ¤Æ¤¤¤Þ¤¹¡£Shift_JIS ¤È EUC-JP ¤ä UTF8 ¤Ê¤É¾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤È¤Î¥³¡¼¥ÉÊÑ´¹¤Ë¤Ä¤¤¤Æ¤Ï¡¢Jcode ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

¤³¤Î¥â¥¸¥å¡¼¥ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Þ¤¹¡£

encode_pictogram
$html = encode_pictogram($rawtext);

¥Æ¥­¥¹¥È¤Ë´Þ¤Þ¤ì¤ë i-modeÍѳ¨Ê¸»ú¤òHTML¿ôÃÍ»²¾È¤Ë¥¨¥ó¥³¡¼¥É¤·¤Þ¤¹¡£

decode_pictogram
$rawtext = decode_pictogram($html);

i-modeÍѳ¨Ê¸»ú¤ÎHTML¿ôÃÍ»²¾È¤ò¡¢¼ÂÂΤ˥ǥ³¡¼¥É¤·¤Þ¤¹¡£

remove_pictogram
$cleantext = remove_pictogram($rawtext);

¥Æ¥­¥¹¥È¤Ë´Þ¤Þ¤ì¤ë i-modeÍѳ¨Ê¸»ú¤òºï½ü¤·¤Þ¤¹¡£

¤³¤Î¥â¥¸¥å¡¼¥ë¤Ï°Ê²¼¤Î´Ø¿ô¤òɬÍפʤé¤Ð¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Þ¤¹¡£

find_pictogram
$num_found = find_pictorgram($rawtext, \&callback);

¥Æ¥­¥¹¥ÈÃæ¤Î i-modeÍѳ¨Ê¸»ú¤òõ¤·¤Æ¡¢¸«¤Ä¤«¤Ã¤¿¤é¤½¤ì¤¾¤ì¤ËÂФ·¤Æ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ò¼Â¹Ô¤·¤Þ¤¹¡£¸«¤Ä¤«¤Ã¤¿³¨Ê¸»ú¤Î¿ô¤òÊÖ¤·¤Þ¤¹¡£

¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Ë¤Ï2¤Ä¤Î°ú¿ô¤¬ÅϤê¤Þ¤¹¡£1¤Ä¤á¤Ï¸«¤Ä¤«¤Ã¤¿³¨Ê¸»ú¤Î¥Ð¥¤¥Ê¥ê¤½¤Î¤â¤Î¡¢2¤Ä¤á¤Ï¤½¤Î³¨Ê¸»ú¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤ò¼¨¤¹10¿Ê¿ô¤Î¿ô»ú¤Ç¤¹¡£¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ÎÊÖ¤êÃͤˤè¤Ã¤Æ¡¢¤â¤È¤Î¥Æ¥­¥¹¥È¤ÏÃÖ´¹¤µ¤ì¤Þ¤¹¡£

encode_pictogram() ¤Î¼ÂÁõ¤ò¾Ò²ð¤·¤Þ¤¹¡£find_pictorgram() ¤Î»È¤¤Êý¤Î¤è¤¤Îã¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£

  sub encode_pictogram {
      my $text = shift;
      find_pictogram($text, sub {
			 my($bin, $number) = @_;
			 return '&#' . $number . ';';
		     });
      return $text;
  }

CAVEAT

¥Æ¥­¥¹¥ÈÃæ¤Î¤¹¤Ù¤Æ¤Îʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ëÀµµ¬É½¸½¤òÍøÍѤ·¤Æ¤¤¤ë¤¿¤á¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤ÎÆ°ºî¤ÏÃÙ¤¤¤Ç¤¹¡£¤³¤ì¤Ï¡¢Shift_JIS ¤Îʸ»ú¶­³¦¤ò¸«¤Ä¤±¤ë¤Ë¤Ï¡¢¤¹¤Ù¤Æ¥Þ¥Ã¥Á¤µ¤»¤ë¤·¤«¤Ê¤¤¤Î¤¬¸¶°ø¤Ç¤¹¡£

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

HTML::Entities, http://www.nttdocomo.co.jp/i/tag/emoji/index.html

1 POD Error

The following errors were encountered while parsing the POD:

Around line 3:

Non-ASCII character seen before =encoding in 'i-modeÍѳ¨Ê¸»ú¤Î¥¨¥ó¥³¡¼¥É/¥Ç¥³¡¼¥É'. Assuming CP1252