Help for this page

Select Code to Download


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