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