06d4b 08bd5
是Unicode代码点??
.
b5 8b e8 af 95
是UTF-8编码??
.
c3 a6 c2 b5 c2 8b c3 a8 c2 af c2 95
是UTF-8编码的UTF-8编码??
.
$ perl -e'
use strict;
use warnings;
use utf8;
use open ":std", ":encoding(UTF-8)";
my $s = "??";
print "$s\n";
printf "%v05X\n", $s;
utf8::encode($s);
printf "%v02X\n", $s;
utf8::encode($s);
printf "%v02X\n", $s;
'
??
06D4B.08BD5
E6.B5.8B.E8.AF.95
C3.A6.C2.B5.C2.8B.C3.A8.C2.AF.C2.95
Run Code Online (Sandbox Code Playgroud)
$ perl -MJSON -e'
use strict;
use warnings;
use utf8;
use open ":std", ":encoding(UTF-8)";
my $s = "??";
printf "%1\$s (%1\$v05X)\n", $s;
my $data = [ $s ];
my $json_utf8 = JSON->new->utf8->encode($data);
printf "%v02X\n", $json_utf8;
$data = JSON->new->utf8->decode($json_utf8);
$s = $data->[0];
printf "%1\$s (%1\$v05X)\n", $s;
'
?? (06D4B.08BD5)
5B.22.E6.B5.8B.E8.AF.95.22.5D
?? (06D4B.08BD5)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
212 次 |
最近记录: |