my $x = chr(174); binmode STDOUT, ':utf8'; print "x has length ", length($x), " >>$x<<\n"; #### x has length 1 >>®<< #### my $x = chr(194).chr(174); binmode STDOUT, ':bytes'; print "x has length ", length($x), " >>$x<<\n"; #### x has length 2 >>®<< #### use Encode; my $code_points = encode('utf8', $x);
## x has length 1 >>®<< ##
## my $x = chr(194).chr(174); binmode STDOUT, ':bytes'; print "x has length ", length($x), " >>$x<<\n"; ##
## x has length 2 >>®<< ##
## use Encode; my $code_points = encode('utf8', $x);