首页 > 技术文章 > mojo 默认启用utf-8

zhaoyangjian724 2016-06-30 19:24 原文

[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 );

推荐阅读