mojo 默认启用utf-8

[root@dr-mysql01 ~]# cat f1.pl 
use Encode;
print "验证111
";
my $d=encode_utf8('验证');
print $d;
print "
";
[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
";
	
	$a3=decode_utf8("$a3");
	
	 my @content=($a1,$a3,$a4);
	 my $href= @content;
	 push (@arr_out ,$href);
	# print "@arr_out is @arr_out
";
	#$c->render(text =>  ("$a1,$a3,$a4") );
	
	print "endtime is $endtime
";
                  }
				                              };
           };
    $c->render(json =>  @arr_out );

原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199752.html