Using Strawberry Perl x64 on Windows, I'm having a bit of a problem with -e
that fails recognize file names if the name contains an accented character, meaning: -e $path
returns false even though the file exists.
I'm reading the file names out of an XML file, and thus, they are strings with the UTF-8 flag set.
I'm quite sure the cause of the problem is the mix of character encodings in Perl on Windows, as the standard encoding of the CMD shell (under which Perl runs) is CP-850, Explorer and the Windows API appear to be using either CP-1252 or 16-bit wide Unicode characters; and the Unicode-enabled strings in Perl.
I have no idea which encoding -e expects to work as it should. It does work if the path contains only plain ASCII characters.
So... what do I have to do to make it work?