[root@dr-mysql01 ~]# cat f1.pl use Encode; print "验证111\n"; my $d=encode_utf8('验证'); print $d; print "\n"; [root@dr-mysql01 ~]# perl f1.pl 验证111 éªè¯ [root@dr-mysql01 ~]# mojo 默认开始utf-8 my $d=encode_utf8('验证'); if ($a3 =~/$d/){ #$msg->reply("\@$friend $a1-$a3-$a4"); print "come in\n"; $a3=decode_utf8("$a3"); my @content=($a1,$a3,$a4); my $href= \@content; push (@arr_out ,$href); # print "\@arr_out is @arr_out\n"; #$c->render(text => ("$a1,$a3,$a4") ); print "endtime is $endtime\n"; } }; }; $c->render(json => \@arr_out );