GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTML::Entities::ImodePictogram.ja(3) User Contributed Perl Documentation HTML::Entities::ImodePictogram.ja(3)
 

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

  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);

HTML::Entities::ImodePictogram ¤Ï¡¢ Shift_JIS ¥×¥é¥¤¥Ù¡¼¥ÈÎΰè¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¡¢i-modeÍѳ¨Ê¸»ú¤ò½èÍý¤¹¤ë¥â¥¸¥å¡¼¥ë¤Ç¤¹¡£
i-modeÍѳ¨Ê¸»ú¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢http://www.nttdocomo.co.jp/i/tag/emoji/index.html ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

¤³¤Î¥â¥¸¥å¡¼¥ë¤Î¤¹¤Ù¤Æ¤Î´Ø¿ô¤Ç¤Ï¡¢Æþ½ÐÎϤÎʸ»úÎó¤Ï Shift_JIS ¤Ç¥¨¥ó¥³¡¼¥É¤µ¤ì¤Æ¤¤¤ë¤ÈÁÛÄꤷ¤Æ¤¤¤Þ¤¹¡£Shift_JIS ¤È EUC-JP ¤ä UTF8 ¤Ê¤É¾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤È¤Î¥³¡¼¥ÉÊÑ´¹¤Ë¤Ä¤¤¤Æ¤Ï¡¢Jcode ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
¤³¤Î¥â¥¸¥å¡¼¥ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Þ¤¹¡£
encode_pictogram
  $html = encode_pictogram($rawtext);
  $html = encode_pictogram($rawtext, unicode => 1);
    
¥Æ¥­¥¹¥È¤Ë´Þ¤Þ¤ì¤ë i-modeÍѳ¨Ê¸»ú¤òHTML»²¾È¤Ë¥¨¥ó¥³¡¼¥É¤·¤Þ¤¹¡£$rawtext ¤¬³ÈÄ¥³¨Ê¸»ú¤ò´Þ¤à¾ì¹ç¡¢Unicode ¥³¡¼¥É¥Ý¥¤¥ó¥È ("") ¤Ç¥¨¥ó¥³¡¼¥É¤·¤Þ¤¹¡£"unicode" ¥ª¥×¥·¥ç¥ó¤òÌÀ¼¨Åª¤ËÍ¿¤¨¤¿¾ì¹ç¡¢¤¹¤Ù¤Æ¤Î³¨Ê¸»ú¤ò Unicode ¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ç¥¨¥ó¥³¡¼¥É¤·¤Þ¤¹¡£¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢SJIS10¿Ê¿ô ("&#NNNNN;") ¤Ç¥¨¥ó¥³¡¼¥É¤·¤Þ¤¹¡£
decode_pictogram
  $rawtext = decode_pictogram($html);
    
i-modeÍѳ¨Ê¸»ú¤ÎHTML»²¾È("" ¤È "&#NNNNN;" ¤ÎξÊý)¤ò¡¢¼ÂÂÎ¤Ë Shift_JIS ¤Ç¥Ç¥³¡¼¥É¤·¤Þ¤¹¡£
remove_pictogram
  $cleantext = remove_pictogram($rawtext);
    
¥Æ¥­¥¹¥È¤Ë´Þ¤Þ¤ì¤ë i-modeÍѳ¨Ê¸»ú¤òºï½ü¤·¤Þ¤¹¡£
¤³¤Î¥â¥¸¥å¡¼¥ë¤Ï°Ê²¼¤Î´Ø¿ô¤òɬÍפʤé¤Ð¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Þ¤¹¡£
find_pictogram
  $num_found = find_pictorgram($rawtext, \&callback);
    
¥Æ¥­¥¹¥ÈÃæ¤Î i-modeÍѳ¨Ê¸»ú¤òõ¤·¤Æ¡¢¸«¤Ä¤«¤Ã¤¿¤é¤½¤ì¤¾¤ì¤ËÂФ·¤Æ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ò¼Â¹Ô¤·¤Þ¤¹¡£¸«¤Ä¤«¤Ã¤¿³¨Ê¸»ú¤Î¿ô¤òÊÖ¤·¤Þ¤¹¡£
¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤Ë¤Ï3¤Ä¤Î°ú¿ô¤¬ÅϤê¤Þ¤¹¡£1¤Ä¤á¤Ï¸«¤Ä¤«¤Ã¤¿³¨Ê¸»ú¤Î¥Ð¥¤¥Ê¥ê¤½¤Î¤â¤Î¡¢2¤Ä¤á¤Ï¤½¤Î³¨Ê¸»ú¤ÎShift_JIS¥³¡¼¥É¥Ý¥¤¥ó¥È¤ò¼¨¤¹10¿Ê¿ô¤Î¿ô»ú, 3¤Ä¤á¤Ï Unicode ¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ç¤¹¡£¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô¤ÎÊÖ¤êÃͤˤè¤Ã¤Æ¡¢¤â¤È¤Î¥Æ¥­¥¹¥È¤ÏÃÖ´¹¤µ¤ì¤Þ¤¹¡£
encode_pictogram() ¤Î´Êñ¤Ê¤¢¼ÂÁõ¤ò¾Ò²ð¤·¤Þ¤¹¡£ find_pictorgram() ¤Î»È¤¤Êý¤Î¤è¤¤Îã¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£¤³¤ÎÎã¤Ç¤Ï¡¢³ÈÄ¥³¨Ê¸»ú¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
  sub encode_pictogram {
      my $text = shift;
      find_pictogram($text, sub {
                         my($bin, $number, $cp) = @_;
                         return '&#' . $number . ';';
                     });
      return $text;
  }
    

¥Æ¥­¥¹¥ÈÃæ¤Î"¤¹¤Ù¤Æ"¤Îʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ëÀµµ¬É½¸½¤òÍøÍѤ·¤Æ¤¤¤ë¤¿¤á¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤ÎÆ°ºî¤ÏÃÙ¤¤¤Ç¤¹¡£¤³¤ì¤Ï¡¢Shift_JIS ¤Îʸ»ú¶­³¦¤ò¸«¤Ä¤±¤ë¤Ë¤Ï¡¢¤¹¤Ù¤Æ¥Þ¥Ã¥Á¤µ¤»¤ë¤·¤«¤Ê¤¤¤Î¤¬¸¶°ø¤Ç¤¹¡£
³ÈÄ¥³¨Ê¸»ú¤Î¥µ¥Ý¡¼¥È¤Ï´°Á´¤È¤Ï¸À¤¨¤Þ¤»¤ó¡£³¨Ê¸»ú¤ò Unicode ¤Ç°·¤¤¤¿¤¤¾ì¹ç¤Ï¡¢perl 5.8.0 °Ê¾å¤ËÉÕ°¤Î Encode ¥â¥¸¥å¡¼¥ë¤ä¡¢Unicode::Japanese ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£

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.

HTML::Entities, Unicode::Japanese, http://www.nttdocomo.co.jp/p_s/imode/tag/emoji/

Hey! The above document had some coding errors, which are explained below:
Around line 3:
Non-ASCII character seen before =encoding in 'i-modeÍѳ¨Ê¸»ú¤Î¥¨¥ó¥³¡¼¥É/¥Ç¥³¡¼¥É'. Assuming CP1252
2002-08-05 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.