in reply to Perl -T vs Mime::Types

Hello roperl,

CPAN has the module Test::PureASCII, but it’s designed to function in a testing environment:

use strict; use warnings; use Test::PureASCII tests => 2; for my $file ('ascii.txt', 'umlaut.txt') { file_is_pure_ascii($file, "Only ASCII in $file"); }

Output (with suitable input files in the current directory):

17:00 >perl 1823_SoPW.pl 1..2 ok 1 - Only ASCII in ascii.txt not ok 2 - Only ASCII in umlaut.txt # Failed test 'Only ASCII in umlaut.txt' # at 1823_SoPW.pl line 38. # non ASCII character sequence 0xc3, 0xb6 at line 5 in umlaut.txt # Looks like you failed 1 test of 2. 17:00 >

Hope that’s of interest,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,