Help for this page

Select Code to Download


  1. or download this
    use feature qw( say );
    use Encode qw( encode );
    ...
          "\342\200\234";
    
    # Output: 1
    
  2. or download this
    utf8::decode($s);
    
  3. or download this
    use utf8;
    
  4. or download this
    use open ':std', ':encoding(UTF-8)';
    
  5. or download this
    use feature qw( say );
    use Encode qw( decode );
    ...
    
    my $ucp = decode("UTF-8", $utf8);
    say length($ucp);    # 26 chars
    
  6. or download this
    use feature qw( say );
    use Encode qw( decode );
    ...
    my $ucp = decode("UTF-8", $utf8);
    say length($ucp);    # 26 chars
    Dump($ucp);          # CUR = 30