Perl 處理中文, 加入
use encoding big5;
$string="中文成功123";
後, split(//,$string); 即可拆成 "中","文","成","功","1","2","3"
若是從資料庫取得的字串, 可試試
$string=decode("big5", $string);
再做 @str=split(//,$string);
Mar 25, 2009
perl 中文 string split by use encoding big5
Subscribe to:
Post Comments (Atom)
0 意見:
Post a Comment