Thanks for the sensible suggestion!

I put an SSCCE together, which produces this output with strawberry-perl v5.38.0 under Windows 10 (default file system type, I guess):

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 $fnameNo +UTF8:$!"; 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";

In reply to Re^2: utf8::downgrade() and file system operators by hexcoder
in thread utf8::downgrade() and file system operators by hexcoder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.