perl 中文 编码 uincode html 转换 中文

    技术2022-05-20  80

    use Encode;   use strict;   use warnings;      my $str='阿斯' ;   $str=~s/&#(/d+);/chr(($1 + 0 ))/eg;//之前的,好不容易才探索出之前的那个正确的方法   #$str=~s/&#(/d+);/pack('U' ,$ 1 )/eg;//后来的   print(encode('gbk' ,$str)); 

    最新回复(0)