in reply to Problem running shell command from Perl

Unless things have changed (I last checked maybe 7 years ago), Win32 Perl builds are using the Ansi Windows API, rather than the "Wide" windows API that supports Unicode. This affects things like using CreateProcessA instead of CreateProcessW when you call 'system'. I don't know if it is actually possible to specify a unicode filename using CreateProcessA, and in fact this probably means that Perl *requires* the use of those 8.3 filenames that you're trying to detect.

What happens if you "readdir" on the directory that file is in? (or any other common perl library for listing the directory) What do you get back?

It might be that the only workaround is to use the Win32 module directly. Oh, but now that I look there, I see Win32::GetANSIPathName. I can't imagine that would be useful if it didn't accept unicode filenames, so maybe give that a try?

  • Comment on Re: Problem running shell command from Perl