Help for this page

Select Code to Download


  1. or download this
    my $s = ...;
    
    ...
    
    say utf8::is_utf8( $t ) ?1:0;   # 1
    say $s eq $t            ?1:0;   # 1
    
  2. or download this
    my $s = ...;
    
    ...
    
    say utf8::is_utf8( $t ) ?1:0;   # 0
    say $s eq $t            ?1:0;   # 1
    
  3. or download this
    utf8::decode( $_ ) if !utf8::is_utf8( $_ );
    
  4. or download this
    utf8::encode( $_ ) if utf8::is_utf8( $_ );