ã©ããæ°ã«ãªã£ãã®ã§ããã shag ã®æ¥è¨ - æ¥æ¬èª(EUC-JP)ã® substr ä»ã® Perl(5.8 以é)ã¯æååã utf8 ã ã£ããæ¨æºæ·»ä»ã® substr() ã使ã£ã¦çµäºãªãã¿ãªããã ãããããã£ã¦ EUC-JP ãªæååã§æ¥æ¬èªã 1 æåã¨æ°ã㦠substr ããããµãã«ã¼ãã³ãèãã¦ã¿ããä»ããã ãã®æå㪠Perlã¡ã¢ã«æ¥æ¬èª(EUC-JP)ãå«ãæååã® split ã¨ããã®ã(æååä½ã«åå²ãã)ãããã ãã©ããããåèã« euc_substr() ã¨ãããµãã«ã¼ãã³ãæ¸ãã¦ã¿ããä¸å¿ offset ã ãã§ãã¤ã±ã«ã ãªãããeuc_substr($str, 0, 5) ã¨ãLENGTH ã 5 ã«æå®ãã¦ããã®ã«ã6 æååãåºãããã®ã¯æ£ããåãã ã¨æããããã£ãã®ã¨ã use strict; use Encode; sub euc_substr
{{#tags}}- {{label}}
{{/tags}}