in reply to stat() and utf8 filenames on Win32 fails for me, why?

Windows provides two interface ("A" and "W"), and Perl uses the one where file names have to be encoded using the current (OEM) code page. That would be the same as on unix, except Windows's UTF-8 support sucks. Switching your console to the UTF-8 cp gives all kinds of problems.

Perl does have great support for UCS-2le. That's what it uses internally. You can use the "W" interface to work with this encoding. This gives access to the full range of characters supported by Windows. It's what you have to use to create files with names that lie outside your code page.

In short, Perl uses a unix-centric approach, so you have to go outside the box on Windows.

Decode the file name from whatever encoding your source uses, encode it using UTF-16le, get a system handle to the file using Win32API::File's "W" functions, convert it to a Perl file using the function provided by the same module, then stat the handle.

Update: Fleshed out details.