> 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
> archive
The easiest fix would be to use a perl which is using the W (wide)
string functions
and not the A, as ActivePerl does. And then recompile libwin32.
I'm also fighting with the same issue on Win32::GUI
(japanese and proper umlauts) with UCS-2 encoded strings.
2006/1/25, Dewey Allen <[EMAIL PROTECTE
you're right, and, if you need to deal with unicode in file names, you do
something like this:
use Win32::OLE qw(in CP_UTF8);
use Win32::OLE::Const;
Win32::OLE->Option(CP=>CP_UTF8);
use Unicode::String qw/utf8/;
my $oshell = Win32::OLE->new('Shell.Application') or die "$@";
my $f = $oshell-
Thank you for the response. I tried that but it doesn't work... because
the actual filename returned by the builtin functions, using the example,
is "??_HostID_2006-01-19_213218.xls". It's not just a STDOUT display
issue where the leading UTF8 characters are being displayed as question
Reini Urban wrote:
The easiest fix would be to use a perl which is using the W (wide)
string functions
and not the A, as ActivePerl does. And then recompile libwin32.
I believe that the Win32 Perl source has been "fixed" so that it only
uses the ANSI versions of the Win32 API directory calls.
I like your idea about packing and unpacking the data - in place of using
Win32::API::Struct to create a WIN32_FIND_DATAW structure. But fiddling
with this incessantly over a few days (more), it strikes me that the
fundamental requirement is to get Perl to recognize the "cFileName" field
retur
Reini Urban wrote:
The easiest fix would be to use a perl which is using the W (wide)
string functions
and not the A, as ActivePerl does. And then recompile libwin32.
I believe that the Win32 Perl source has been "fixed" so that it only
uses the ANSI versions of the Win32 API directory calls.
I believe that the Win32 Perl source has been "fixed" so that it only uses
the ANSI versions of the Win32 API directory calls. If correct, then
there is no "perl" for Win32 that uses the Win32 API wide directory calls
to implement Perl's builtin directory functions. See the following.
http:/