|Don't ask to ask, just ask|
Win32 Unicode filenames: how to get their size ?by olivierp (Hermit)
|on Aug 19, 2004 at 09:45 UTC||Need Help??|
olivierp has asked for the
wisdom of the Perl Monks concerning the following question:
Greetings Monks !
I am traversing a series of directories / subdirectories on a W2K system, and fetching the size of each file in the directory, with something like this snippet:
This works fine for filenames containing ASCII / Latin1 characters, but -s "$file" returns undef, when the filename contains Unicode chars (japanese, ukrainian, thai, etc...) which is not really useful...
I've tried adding "use utf8;" to the script, but there is no change.
Is there a way to specify which encoding to use for opendir / readdir, as with open ?