in reply to Re^3: Unicode File Names
in thread Unicode File Names

I used to. In Work Backup I found that turning on ${^WIDE_SYSTEM_CALLS} made File::Find and File::Copy work correctly even if file names contained strange characters. That was on ActiveState Perl 623, Perl 6.5.1.

The latter ends up calling Win32::CopyFile, but the former ends up calling readdir, a built-in primitive. So I know that at least returned Unicode when getting a list of file names. I also assume it got consistant results and no not-found errors when passing such a name to stat or lstat.

Trying that now, I see that readdir is not working. It is giving mangled results consistant with using the ANSI form of the underlying Win32 calls.

It used to work. Now it's crippled.

--John

Replies are listed 'Best First'.
Re^5: Unicode File Names
by John M. Dlugosz (Monsignor) on Feb 09, 2005 at 19:52 UTC
    I downloaded the source code. I found
    #define USING_WIDE() (0)
    in win32/perlhost.h. It appears to control the behavior, e.g.
    if (USING_WIDE()) { ... f = _wfopen(PerlDir_mapW(wBuffer), wMode); } else f = fopen(PerlDir_mapA(filename), mode);
    So, it hasn't been totally ripped out; just the ${^WIDE_SYSTEM_CALLS} switch, to specify the wide mode, has been removed. --John
Re^5: Unicode File Names
by Courage (Parson) on Feb 09, 2005 at 20:23 UTC
    well, thank you for that bit of knowledge, and, secondly, looks like a perfect time to fill a bug report...
    that should be fixed, of course!