标签:style blog encoding utf-8 str gbk 中文乱码 code name
1 use utf8; 2 my $name = ‘你好‘; 3 #binmode(STDOUT, ":encoding(gbk)"); 4 print $name,"\n"; 5 6 # #或 7 # use Encode; 8 # my $str=‘你好‘; 9 # $str = encode("gbk", decode("utf-8", $str)); 10 # print $str,"\n";
标签:style blog encoding utf-8 str gbk 中文乱码 code name
原文地址:http://www.cnblogs.com/perl6/p/6417790.html