Help for this page

Select Code to Download


  1. or download this
    use Encode;
    
    ...
    printf "chr=<%s> utf8-flag=%s length=%d\n"
      , $s, Encode::is_utf8($s)?'yes':'no', length($s);
    #outputs: chr=<?> utf8-flag=no length=2