11 use Digest::MD5 qw(md5_hex);
14 $str = "foo\xFF\x{100}";
18 print "not ok 1\n"; # should not run
20 print "not " unless $@ && $@ =~ /^(Big byte|Wide character)/;
23 my $exp = ord "A" == 193 ? # EBCDIC
24 "c307ec81deba65e9a222ca81cd8f6ccd" :
25 "503debffe559537231ed24f25651ec20"; # Latin 1
27 chop($str); # only bytes left
28 print "not " unless md5_hex($str) eq $exp;
32 print "not " unless md5_hex("foo\xFF") eq $exp;