> I have a Win32 Perl coding challenge to search a directory > (WinXP, NTFS) > with a file specification pattern where the directory may > contain files > with unicode / wide filenames in addition to ANSI filenames. > Through > trial, error, and searches against Perl mailing list > archives, it seems > apparent that Win32 Perl's builtin directory functions do not > support / > return Win32 unicode / wide filenames. More specifically, > the builtin > functions return filenames like "??????_HostID_2006-01-19_213218.xls" > when the filename contains unicode / wide characters (the same as the > DOS "dir" command). The problem is that you can't pass these > filenames > to something like stat or via OLE to ask Excel to open it.
you need activate Unicode in OLE binding: use Win32::OLE qw(in CP_UTF8); Win32::OLE->Option(CP=>CP_UTF8);