jdporter has asked for the wisdom of the Perl Monks concerning the following question:
I'm getting this odd, unheretofore-seen behavior from readdir on Windows 7. It has started returning "short" (8.3) filenames, at least for a directory on a network share. Several of my critical Perl programs are now broken! Any idea how to stop this?
Some details: I'm running the perl programs on a Windows 7 workstation; the filesystem being read is on a Windows Server 2003 R2 machine. Of possible significance is that we had a power outage last night; my machine survived, but the server may have rebooted.
I also verified that it is not exhibiting this behavior when reading a directory on the local workstation, only when reading the share on the server.
MidLifeXis floated the idea that the value of the registry entry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem:Win31FileSystem may have changed. But I checked; it is still zero on all machines involved.
Thanks in advance...
Update: It seems I resolved the problem by changing my system's locale to coincide with the language in the filenames. Hrmph. It still seems strange to me, because I've never had this problem before, and I've been doing stuff exactly like this for quite some time.
Footnote: So it seems I omitted one detail which turned out to be critical: the filenames in question contained characters not valid in the current system locale. Still, I think I would have run into this problem before, as I deal with multiple languages quite a bit and have to switch the system locale rather often.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Make readdir stop returning short (8.3) filenames
by Limbic~Region (Chancellor) on Apr 05, 2011 at 14:46 UTC | |
by jdporter (Paladin) on Apr 05, 2011 at 15:05 UTC | |
by Limbic~Region (Chancellor) on Apr 05, 2011 at 15:27 UTC |