Á°¤Ø << ʸ»ú¥³¡¼¥É¤È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° (1) | ÈëÌ©¾ðÊó¤Î´ÉÍý >> ¼¡¤Ø |
JIS X 0208 ¤Ë¤Ï̤ÄêµÁÎΰ褬¸ºß¤·¤Þ¤¹¡£¤³¤³¤Ë ¥Ù¥ó¥À¤¬¾¡¼ê¤Ëʸ»ú¤òÄêµÁ¤·¤¿¤â¤Î¤òµ¡¼ï°Í¸ʸ»ú¤È¸À¤¤¤Þ¤¹¡£µ¡¼ï°Í¸ʸ»ú¤Î¼ïÎà¤Èʸ»ú¥³¡¼¥É¤Ë¤Ä¤¤¤Æ¤Ï http://www2d.biglobe.ne.jp/~msyk/charcode/kisyuizon/index.html ¤¬ÊØÍø¤Ç¤¹¡£Æäˡ¢¤³¤Á¤é¤Ë¤Ï Windows ´Ä¶¤¬¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢ ¤È¤Æ¤â»²¹Í¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
Ⱦ³Ñ¥«¥Ê¤È¤Ï¡¢JIS X 0201 ¤Î±¦È¾Ì̤ˤ¢¤ë¥«¥¿¥«¥Êʸ»ú¤Ç¤¹¡£ Shift_JIS¡¢EUC-JP ¤Ç¤Ï¡¢È¾³Ñ¥«¥Ê¤ò»È¤Ã¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£ ¤·¤«¤·¡¢ISO-2022-JP ¤Ç¤Ï»È¤Ã¤Æ¤Ï¤¤¤±¤Ê¤¤¤Î¤Ç¤¹¡£ºÆÅÙ³Îǧ¤·¤Æ¤ª¤¤Þ¤¹¤¬¡¢JIS X 0208 ¤ä JIS X 0201 ¤Ê¤É¤Ï ʸ»ú¤ÎÈÖ¹æ¤ò·è¤á¤Æ¤¤¤ëʸ»ú½¸¹ç¤Ç¤¹¡£°ìÊý¡¢Shift_JIS¡¦ EUC-JP¡¢ISO-2022-JP ¤Ê¤É¤Ï¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¡¢¤Ä¤Þ¤ê JIS X 0208¡¦JIS X 0201 ¤Ê¤É¤Î²¿¼ïÎफ¤Îʸ»ú½¸¹ç¤ò Ʊ»þ¤Ë°·¤¦¤¿¤á¤ÎÊýË¡¤ò·è¤á¤¿¤â¤Î¤Ç¤¹¡£
¤Þ¤º¤Ïµ¡¼ï°Í¸ʸ»ú¤«¤é¡£ ´Ý1¤ä¥®¥ê¥·¥ãʸ»ú¤Ê¤É¤Îµ¡¼ï°Í¸ʸ»ú¤Ï¡¢ JIS X 0208 ¤Î̤ÄêµÁÎΰè¤Ë³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Þ¤¹¡£ UNIX ·Ï OS ¤Ç¤Ï¡¢¤½¤ÎÉôʬ¤ËÂбþ¤¹¤ë¥Õ¥©¥ó¥È¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Ê¤¤¤¿¤á¡¢ ¤¿¤À¤Î¶õÇò¤Ë¸«¤¨¤Þ¤¹¡£Mac ¤Ç¤ÏÁ´¤¯Ê̤Υե©¥ó¥È¤¬³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¤¿¤á¡¢ Ê̤Îʸ»ú¤Ë¸«¤¨¤Þ¤¹¡£web ¤Ê¤ó¤Æ¤Î¤Ï¤É¤Î´Ä¶¤«¤é¤Ç¤â¥¢¥¯¥»¥¹¤Ç¤¤ë¤Î¤¬Ì¥ÎϤʤΤǤ¹¤«¤é¡¢ ¤³¤¦¤¤¤¦¾ã³²¤Ï CGI ¥×¥í¥°¥é¥à¦¤Ç¼è¤ê½ü¤¤Þ¤·¤ç¤¦¡£
Î㤨¤Ð´Ý1¤Ï EUC-JP ¤Ç¤Ï 0xADA1 ¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢ Shift-JIS ¤Ç¤Ï 0x8740¡¢ISO-2022-JP ¤Ç¤Ï 0x2D21 ¤Ë¤Ê¤ê¤Þ¤¹¡£ ¤Ç¤¹¤«¤é¡¢¤Þ¤ºÊ¸»ú¥³¡¼¥É¤òÅý°ì¤·¤Æ¤«¤éµ¡¼ï°Í¸ʸ»ú¤òÊÑ´¹¤¹¤ë¤Î¤¬ ¤ª¼ê·Ú¤Ç¤¹¡£ ¤³¤³¤Ç¤Ïʸ»úÎó¤ò ¤Þ¤º EUC-JP ¤ËÊÑ´¹¤·¤Æ¡¢¤½¤ì¤«¤é 0xADA1 ¤ò (1) ¤Ë¡¢ 0xADA2 ¤ò (2) ¤ËÊÑ´¹¡Ä¤È¤¤¤¦¤Õ¤¦¤Ë¤·¤Þ¤·¤ç¤¦¡£
¤Þ¤º»×¤¤ÉÕ¤¯¤Î¤¬
require 'jcode.pl'; $str = "´Ý1´Ý2"; # ¡Öµ¡¼ï°Í¸ʸ»ú¤Î´Ý1¡×¡Öµ¡¼ï°Í¸ʸ»ú¤Î´Ý2¡×¤À¤È»×¤Ã¤Æ²¼¤µ¤¤¡£ &jcode::convert(\$str,'euc'); $str =~ s/\xAD\xA1/(1)/g; $str =~ s/\xAD\xA2/(2)/g; ....¤È¤¤¤¦½ñ¤Êý¤Ç¤¹¤¬¡¢¤³¤¦¤¤¤¦Ã±½ã¤ÊÊÑ´¹¤Ç¤Ï¥À¥á¤Ç¤¹¡£ ¤Ê¤¼¤«¤È¤¤¤¦¤È¡Ä²òÀ⤷½Ð¤¹¤ÈŤ¯¤Ê¤ë¤Î¤Ç http://www.din.or.jp/~ohzaki/perl.htm#JP_Match ¤òÆɤó¤Ç²¼¤µ¤¤¡£¤Ê¤ª¡¢¤³¤Î¥Ú¡¼¥¸¤Ï¤È¤Æ¤â»²¹Í¤Ë¤Ê¤ê¤Þ¤¹¡£perl ¤ä CGI ¤Î²òÀâ¤È¤¤¤¦¤È¡¢ ¤¤¤¤¤«¤²¤ó¤Ç´Ö°ã¤¤¤À¤é¤±¤Î¥Ú¡¼¥¸¤¬Â¿¤¤¤Î¤Ç¤¹¤¬¡¢ ¤³¤³¤Ï¿ô¾¯¤Ê¤¤¡ÖÀµ¤·¤¤Ã챤òÆÀ¤é¤ì¤ë¡×¥Ú¡¼¥¸¤Ç¤¹¡£¤¼¤ÒÆɤߤޤ·¤ç¤¦¡£¤È¤¤¤¦¤ï¤±¤Ç¡¢¼«Æ°ÊÑ´¹¤Ï ¤³¤ó¤Ê´¶¤¸¤Ë¤Ê¤ê¤Þ¤¹¡£conv-wrong-char.cgi (¼Â¹Ô·ë²Ì)
1: #!/usr/local/bin/perl 2: 3: # ¼«Ê¬¼«¿È¤Î¥Õ¥¡¥¤¥ë̾¤ò¼èÆÀ 4: $script_name = $ENV{SCRIPT_NAME}; 5: $script_name =~ s|.*/([^/]+)$|$1|; 6: 7: print <<END; 8: Content-type: text/html 9: 10: <HTML><BODY BGCOLOR="#eeeeee"> 11: <CENTER><H1>Ⱦ³Ñ¥«¥Ê¡¦µ¡¼ï°Í¸ʸ»úÊÑ´¹¥Õ¥©¡¼¥à</H1></CENTER> 12: <HR NOSHADE><TABLE BORDER><TR><TD><PRE> 13: --[Ⱦ³Ñ¥«¥Ê]---------------------------------------------------- 14: Ž¡Ž¢Ž£Ž¤Ž¥Ž¦Ž§Ž¨Ž©ŽªŽ«Ž¬ŽŽ®Ž¯Ž±Ž²Ž³Ž´ŽµŽ¶Ž·Ž¸Ž¹ŽºŽ»Ž¼Ž½Ž¾Ž¿ŽÀŽÁŽÂŽÃŽÄŽÅŽÆŽÇŽÈŽÉŽÊŽËŽÌŽ¾ŽÎŽÏŽÐŽÑŽÒŽÓŽÔŽÕŽÖŽ×ŽØŽÙŽÚŽÛŽÜŽÝŽÞŽß 15: --[13¶è]-------------------------------------------------------- 16: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿À 17: ÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßà 18: áâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ 19: --[92¶è]-------------------------------------------------------- 20: 21: ü¡ü¢ü£ü¤ü¥ü¦ü§ü¨ü©üªü«ü¬üü®ü¯ü°ü±ü²ü³ü´üµü¶ü·ü¸ü¹üºü»ü¼ü½ü¾ü¿üÀ 22: üÁüÂüÃüÄüÅüÆüÇüÈüÉüÊüËüÌüÍüÎüÏüÐüÑüÒüÓüÔüÕüÖü×üØüÙüÚüÛüÜüÝüÞüßüà 23: üáüâüãüäüåüæüçüèüéüêüëüìüíüîüïüðüñüòüóüôüõüöü÷üøüùüúüûüüüýüþ 24: </PRE> 25: </TABLE> 26: ¢¬¤³¤ÎÊÕ¤Îʸ»ú¤ò²¼¤Î¥Æ¥¥¹¥È¥¨¥ê¥¢¤Ë¥³¥Ô¡¼¤·¤Æ²¼¤µ¤¤¡£<BR> 27: Windows °Ê³°¤Î´Ä¶¤Ç¤Ï ¤ï¤«¤é¤Ê¤¤¤Ç¤·¤ç¤¦¤¬¡¢[13¶è] °Ê¹ß¤Ëµ¡¼ï°Í¸ʸ»ú¤¬ 28: ɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ 29: <P> 30: <FORM METHOD=GET ACTION="$script_name"> 31: <TEXTAREA NAME=CONTENT COLS=60 ROWS=8> 32: </TEXTAREA> 33: <INPUT TYPE=SUBMIT VALUE=OK><INPUT TYPE=RESET VALUE=CLEAR> 34: </FORM> 35: END 36: 37: #----------- ʸ»úÎó¤ò¼èÆÀ ------------------ 38: require 'jcode.pl'; 39: 40: foreach ( split(/&/,$ENV{QUERY_STRING}) ){ 41: ($name,$value) = split(/=/, $_); 42: $value =~ tr/+/ /; 43: $value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg; 44: 45: &jcode::convert(\$value,'euc'); 46: 47: $value =~ s/&/&/g; 48: $value =~ s/</</g; 49: $value =~ s/>/>/g; 50: $value =~ s/\n/<BR>\n/g; 51: 52: $FORM{$name} = $value; 53: } 54: 55: #----- %conv_table ¤ò½é´ü²½ ---- 56: &init_table; 57: 58: #----- ¥¢¥¹¥¡¼¥³¡¼¥É¡¦EUC ¤Î2¥Ð¥¤¥È¡¦EUC ¤Î3¥Ð¥¤¥È¤ÎÀµµ¬É½¸½ ----- 59: $ascii = '[\x00-\x7F]'; 60: $twoBytes = '[\xA1-\xFE][\xA1-\xFE]'; 61: $threeBytes = '\x8F[\xA1-\xFE][\xA1-\xFE]'; 62: 63: #----- ÊÑ´¹ÂÐ¾Ý¤Ï ----- 64: # Ⱦ³Ñ¥«¥Ê 8EA0-8EDF 65: # 13¶è ADA1-ADFE 66: # 89¶è F9A1-F9FE 67: # 90¶è FAA1-FAFE 68: # 91¶è FBA1-FBFE 69: # 92¶è FCA1-FCFE 70: $pattern='\x8E[\xA0-\xDF]|[\xAD\xAE\xF9\xFA\xFB\xFC][\xA1-\xFE]'; 71: 72: #------- ÊÑ´¹Á°¤Îʸ»úÎó¤òɽ¼¨ --------- 73: print "<HR NOSHADE>\nÊÑ´¹Á° <TABLE BORDER><TR><TD>$FORM{CONTENT}</TABLE>\n"; 74: 75: #-------- ÊÑ´¹ ------- 76: $found_count = $FORM{CONTENT} =~ 77: s!\G(($ascii|$twoBytes|$threeBytes)*?)($pattern)! 78: $1<FONT COLOR=RED>$conv_table{$3}</FONT>!g; 79: 80: #-------- ̵Â̤ʥ¿¥°¤ò¾Ã¤¹ ------------ 81: $FORM{CONTENT} =~ s|</FONT><FONT COLOR=RED>||g; 82: 83: #------- ÊÑ´¹¸å¤Îʸ»úÎó¤òɽ¼¨ --------- 84: print "\n<P>ÊÑ´¹¸å (ÊÑ´¹¤·¤¿µ¡¼ï°Í¸ʸ»ú¤Ï\n"; 85: print "<FONT COLOR=RED>ÀÖ¿§</FONT>¤Çɽ¼¨¤µ¤ì¤Þ¤¹)\n"; 86: print "<TABLE BORDER><TR><TD>$FORM{CONTENT}</TABLE>\n<P>"; 87: 88: if ( $found_count == 0 ){ 89: print "Ⱦ³Ñ¥«¥Ê¡¦µ¡¼ï°Í¸ʸ»ú¤Ï¸«ÉÕ¤«¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£"; 90: } else { 91: print "Ⱦ³Ñ¥«¥Ê¡¦µ¡¼ï°Í¸ʸ»ú¤¬ $found_count ¸Ä ¸«ÉÕ¤«¤ê¤Þ¤·¤¿¡£"; 92: } 93: print "<P></BODY></HTML>\n"; 94: 95: exit; 96: 97: 98: #------------- %conv_table ¤ò½é´ü²½ ------------------- 99: sub init_table { 100: %conv_data =( 101: # Ⱦ³Ñ¥«¥Ê (0x8EA0 ¤â°ì±þÄêµÁ¤·¤Æ¤¤¤ë¤³¤È¤ËÃí°Õ) 102: 0x8EA0=> 103: qq( ¡£ ¡Ö ¡× ¡¢ ¡¦ ¥ò ¥¡ ¥£ ¥¥ ¥§ ¥© ¥ã ¥å ¥ç ¥Ã 104: ¡¼ ¥¢ ¥¤ ¥¦ ¥¨ ¥ª ¥« ¥ ¥¯ ¥± ¥³ ¥µ ¥· ¥¹ ¥» ¥½ 105: ¥¿ ¥Á ¥Ä ¥Æ ¥È ¥Ê ¥Ë ¥Ì ¥Í ¥Î ¥Ï ¥Ò ¥Õ ¥Ø ¥Û ¥Þ 106: ¥ß ¥à ¥á ¥â ¥ä ¥æ ¥è ¥é ¥ê ¥ë ¥ì ¥í ¥ï ¥ó ¡« ¡¬), 107: 108: # 13¶è 109: 0xADA1=> 110: '(1) (2) (3) (4) (5) (6) (7) (8) (9) 111: (10) (11) (12) (13) (14) (15) (16) 112: (17) (18) (19) (20) I II III IV 113: V VI VII VIII IX X . ¥ß¥ê 114: ¥¥í ¥»¥ó¥Á ¥á¡¼¥È¥ë ¥°¥é¥à ¥È¥ó ¥¢¡¼¥ë ¥Ø¥¯¥¿¡¼¥ë ¥ê¥Ã¥È¥ë 115: ¥ï¥Ã¥È ¥«¥í¥ê¡¼ ¥É¥ë ¥»¥ó¥È ¥Ñ¡¼¥»¥ó¥È ¥ß¥ê¥Ð¡¼¥ë ¥Ú¡¼¥¸ mm 116: cm km mg kg cc m^2 . . . . . . . . Ê¿À® " 117: ,, No. K.K. Tel (¾å) (Ãæ) (²¼) (º¸) 118: (±¦) (³ô) (Í) (Âå) ÌÀ¼£ ÂçÀµ ¾¼Ï 119: ¢â ¢á ¢é ¢é ¦² ¢å ¢Ý 120: ¢Ü £Ì ¢¤ ¢è ¢Á ¢À', 121: 122: # 89¶è 123: 0xF9A1=> 124: '. . . . . . . . . . . . . . . . 125: . . . . . . . . . . . . . . . . 126: . . . . . . . . . . . . . . . . 127: . . . . . . . . . . . . . . . . 128: . . . . . . . . . . . . . . . . 129: . . . . . . . . . . . . . .', 130: 131: # 90¶è 132: 0xFAA1=> 133: '. . . . . . . . . . . . . . . . 134: . . . . . . . . . . . . . . . . 135: . . . . . . . . . . . . . . . . 136: . . . . . . . . . . . . . . . . 137: . . . . . . . . . . . . . . . . 138: . . . . . . . . . . . . . .', 139: 140: # 91¶è 141: 0xFBA1=> 142: '. . . . . . . . . . . . . . . . 143: . . . . . . . . . . . . . . . . 144: . . . . . . . . . . . . . . . . 145: . . . . . . . . . . . . . . . . 146: . . . . . . . . . . . . . . . . 147: . . . . . . . . . . . . . .', 148: 149: # 92¶è 150: 0xFCA1=> 151: q{. . . . . . . . . . . . . . . . 152: . . . . . . . . . . . . . . . . 153: . . . . . . . . . . . . . . . . 154: . . . . . . . . . . . . . . . . 155: . . . . . . . . . . . . . . . . 156: i ii iii iv v vi vii viii ix x ¢Ì | ' ''}, 157: ); 158: 159: 160: #----- ÊÑ´¹Íѥơ¼¥Ö¥ëºîÀ® ------ 161: foreach ( keys %conv_data ){ 162: my $code = $_; 163: foreach ( split(/[\n\s]+/,$conv_data{$_}) ){ 164: my $char_code = pack('C*',$code/256,$code%256); 165: if ( $_ eq '.' ){ 166: $_ = "¢®"; # ̤ÄêµÁÎΰ褫´Á»úÎΰ衣¥²¥¿¤ËÊÑ´¹¡£ 167: } 168: $conv_table{$char_code} = $_; 169: $code++; 170: } 171: } 172: }¤Þ¤º¤Ï56: &init_table;¤«¤é¡£&init_table ¤ÎÃæ¤Ç¤Ï¤¤¤í¤¤¤í¤ä¤Ã¤Æ¤Þ¤¹¤¬¡¢ ºÇ½ªÅª¤Ë¤Ï$conv_table{pack('C*',0x8E,0xA0)}="¡£"; $conv_table{pack('C*',0x8E,0xA1)}="¡¢"; : $conv_table{pack('C*',0x8E,0xB1)}="¥¢"; $conv_table{pack('C*',0x8E,0xB2)}="¥¤"; : $conv_table{pack('C*',0xAD,0xA1)}="(1)"; $conv_table{pack('C*',0xAD,0xA2)}="(2)"; $conv_table{pack('C*',0xAD,0xA3)}="(3)"; : $conv_table{pack('C*',0xAD,0xB5)}="I"; $conv_table{pack('C*',0xAD,0xB6)}="II"; $conv_table{pack('C*',0xAD,0xB7)}="III"; :¤È¤¤¤¦¤Õ¤¦¤Ë¡¢µ¡¼ï°Í¸ʸ»ú¤Îʸ»ú¥³¡¼¥É¤ÈÊÑ´¹¸å¤Îʸ»ú¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£ Î㤨¤Ð 0xADB7 ¤Ï EUC ¤Î¥®¥ê¥·¥ã¿ô»ú¤Î3 ¤Ê¤Î¤Ç¡ÖIII¡×¤ËÊÑ´¹¤¹¤ë¡¢ ¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
59: $ascii = '[\x00-\x7F]'; 60: $twoBytes = '[\xA1-\xFE][\xA1-\xFE]'; 61: $threeBytes = '\x8F[\xA1-\xFE][\xA1-\xFE]';Àµµ¬É½¸½¤Ç EUC ¥³¡¼¥É¤òÀµ¤·¤¯°·¤¦¤¿¤á¤ÎÁ°½àÈ÷¤ò¤·¤Þ¤¹¡£¤ò¤½¤Î¤Þ¤ÞÀµµ¬É½¸½¤Ëľ¤¹¤ÈÀè¤Î¤è¤¦¤Ê·Á¤Ë¤Ê¤ê¤Þ¤¹¡£
- ASCII ¥³¡¼¥É¤Ï 0x00¡Á0x7F (¤³¤³¤Ç¤Ï¥³¥ó¥È¥í¡¼¥ë¥³¡¼¥É¤â°ì½ï¤ËÄêµÁ¤·¤¿)
- ´Á»ú¡¦¤Ò¤é¤¬¤Ê¡¦Á´³Ñ¥«¥¿¥«¥Ê¤Ê¤É (JIS X 0208) ¤Ï 0xA1A1¡Á0xFEFE
(Âè1¥Ð¥¤¥È¡¦Âè2¥Ð¥¤¥È¤È¤â 0xA1¡Á0xFE)- Êä½õ´Á»ú (JIS X 0212) ¡Ä 0x8FA1A1¡Á0x8FFEFE
(Âè2¥Ð¥¤¥È¡¦Âè3¥Ð¥¤¥È¤È¤â 0xA1¡Á0xFE)
63: #----- ÊÑ´¹ÂÐ¾Ý¤Ï ----- 64: # Ⱦ³Ñ¥«¥Ê 8EA0-8EDF 65: # 13¶è ADA1-ADFE 66: # 89¶è F9A1-F9FE 67: # 90¶è FAA1-FAFE 68: # 91¶è FBA1-FBFE 69: # 92¶è FCA1-FCFE 70: $pattern='\x8E[\xA0-\xDF]|[\xAD\xAE\xF9\xFA\xFB\xFC][\xA1-\xFE]';ÊÑ´¹ÂоݤǤ¢¤ëȾ³Ñ¥«¥Ê¤Èµ¡¼ï°Í¸ʸ»ú¤Îʸ»ú¥³¡¼¥É¤òµ½Ò¤·¤Þ¤¹¡£ ¤³¤ì¤â¤½¤Î¤Þ¤ó¤ÞÀµµ¬É½¸½¤Ëľ¤»¤Ð¤è¤¤¤Î¤Ç¤¹¡£¤È¤Ê¤Ã¤Æ¡¢
- Ⱦ³Ñ¥«¥Ê ¡Ä \x8E[\xA0-\xDF]
- 13¶è ¡Ä \xAD[\xA1-\xFE]
- 89¶è ¡Ä \xF9[\xA1-\xFE]
- 90¶è ¡Ä \xFA[\xA1-\xFE]
- 91¶è ¡Ä \xFB[\xA1-\xFE]
- 92¶è ¡Ä \xFC[\xA1-\xFE]
¤È¤Ê¤Ã¤Æ¡¢
- Ⱦ³Ñ¥«¥Ê ¡Ä \x8E[\xA0-\xDF]
- 13¡¦80¡Á92¶è ¡Ä [\xAD\xF9\xFA\xFB\xFC][\xA1-\xFE]
¤È¡¢¿¿¤óÃæ¤Ë `|' ¤ò¶´¤ó¤Ç´°À®¤Ç¤¹¡£
- Ⱦ³Ñ¥«¥Ê¡¢13¡¦80¡Á92¶è ¡Ä \x8E[\xA0-\xDF]|[\xAD\xF9\xFA\xFB\xFC][\xA1-\xFE]
76: $found_count = $FORM{CONTENT} =~ 77: s!\G(($ascii|$twoBytes|$threeBytes)*?)($pattern)! 78: $1<FONT COLOR=RED>$conv_table{$3}</FONT>!g;¤è¤¯¤ï¤«¤é¤Ê¤¤¿Í¤Ï $text =~ s!foo!bar!g; ¤ò¹Í¤¨¤Æ²¼¤µ¤¤¡£¤³¤ì¤ÏÍý²ò¤Ç¤¤Þ¤¹¤Í¡£ ¤½¤ì¤ò $count = $text =~ s!foo!bar!g; ¤È¤¹¤ë¤È¡¢ ¥Þ¥Ã¥Á¤·¤¿²ó¿ô¤¬ $count ¤ËÂåÆþ¤µ¤ì¤Þ¤¹¡£ ¤Ç¡¢¤½¤Î foo ¤È bar ¤ò¤Á¤ç¤Ã¤ÈÆñ¤·¤¯¤¹¤ë¤È¾åµ¤ÎÀµµ¬É½¸½¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤ì¤ÇÊÑ´¹¼«ÂΤϽª¤ï¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢µ¡¼ï°Í¸ʸ»ú¤¬Ï¢Â³¤·¤Æ¤¤¤ë¤È
<FONT COLOR=RED>(1)</FONT><FONT COLOR=RED>(2)</FONT><FONT COLOR=RED>(3)</FONT>¤È¤Ê¤Ã¤Æ¤·¤Þ¤¦¤Î¤Ç¡¢76: $found_count = $FORM{CONTENT} =~ 77: s!\G(($ascii|$twoBytes|$threeBytes)*?)($pattern)! 78: $1<FONT COLOR=RED>$conv_table{$3}</FONT>!g;¤Ç¡¢<FONT COLOR=RED>(1)(2)(3)</FONT>¤È¡¢ÌµÂ̤ʥ¿¥°¤ò¾Ã¤·¤Þ¤¹¡£È¾³Ñ¥«¥Ê¡¦µ¡¼ï°Í¸ʸ»ú¤òÃÖ´¹¤¹¤ë¤Ê¤é ¤³¤Î¥¹¥¯¥ê¥×¥È¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤è¤¤¤Ç¤¹¤·¡¢È¾³Ñ¥«¥Ê¡¦µ¡¼ï°Í¸ʸ»ú¤¬ ¸ºß¤¹¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¤¿¤¤¤À¤±¤Ê¤é $found_count ¤Î¿ô¤ò ¸«¤ì¤Ð¤è¤¤¤Ç¤·¤ç¤¦¡£
Á°¤Ø << ʸ»ú¥³¡¼¥É¤È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° (1) | ÈëÌ©¾ðÊó¤Î´ÉÍý >> ¼¡¤Ø |
$Id: char-code-2.html,v 1.4 2004/12/04 15:33:40 68user Exp $