unicode转中文

<pre name="code" class="html">[root@dr-mysql01 ~]# cat a1.pl 
my $str="$ARGV[0]";
use Encode;  
use Encode::CN;  
use JSON;   
use URI::Escape;  
use LWP::Simple;  
$str =~ s/\u([0-9a-fA-F]{4})/pack("U",,hex($1))/eg;    
print "$str";


[root@dr-mysql01 ~]# perl a1.pl "u767bu5f55u6210u529f"
Wide character in print at a1.pl line 8.
登录成功You have mail in /var/spool/mail/root

原文地址:https://www.cnblogs.com/hzcya1995/p/13350037.html