Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    print "$is_ascii entries found to be ascii-only\n" if ( $is_ascii );
    print "$is_wide_utf8 entries found to be utf8\n" if ( $is_wide_utf8);
    print "$is_not_uft8 entries found to be non-utf8\n"  if ( $is_not_utf8
    + );
    
  2. or download this
    my $srchString = $cgi-param( ... );
    $srchString =~ s/\&#(\d+);/chr($1)/ge;  # convert numeric entities to 
    +characters
    ...
        $item = decode( 'utf8', $item );  # make sure perl knows this is u
    +tf8 data
        # ... do other stuff...
    }