perl -w .\TestFileOpsWithUTF8_Names.t 1..2 ok 1 - check -f with non-UTF8 file name not ok 2 - check -f with UTF8 file name # Failed test 'check -f with UTF8 file name' # at .\TestFileOpsWithUTF8_Names.t line 18. # Looks like you failed 1 test of 2. #### #!perl use strict; use warnings; use Test::Simple tests => 2; my $fnameNoUTF8 = q{ß}; # some character that is present in Latin1, but not in ASCII my $fnameUTF8 = $fnameNoUTF8; utf8::upgrade($fnameUTF8); # create an empty file with a NON-ASCII file name open my $fh, q{>}, $fnameNoUTF8 or die "could not create file $fnameNoUTF8:$!"; close $fh or die "could not close file $fnameNoUTF8"; # test for this file with original name ok( -f $fnameNoUTF8 , "check -f with non-UTF8 file name"); # test for this file with UTF8-upgraded name ok( -f $fnameUTF8 , "check -f with UTF8 file name" ); #cleanup unlink $fnameNoUTF8 or die "could not unlink file $fnameNoUTF8";