#!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";