• 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

  • 相关阅读:
    luogu 2962 [USACO09NOV]灯Lights
    bzoj 1923
    bzoj 1013
    bzoj 3513
    bzoj 4259
    bzoj 4503
    CF 632E
    bzoj 3527
    bzoj 3160
    bzoj 2179
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350037.html
Copyright © 2020-2023  润新知