Req #50164 [Opn]: glob is case sensitive on windows where filenames are case insensitive.
Edit report at https://bugs.php.net/bug.php?id=50164&edit=1
ID: 50164
Updated by: cmb@php.net
Reported by: RQuadling at GMail dot com
Summary: glob is case sensitive on windows where filenames
are case insensitive.
Status: Open
Type: Feature/Change Request
Package: Filesystem function related
Operating System: win32 only - Windows XP SP3
PHP Version: 5.3.0
Block user comment: N
Private report: N
New Comment:
There might be issues regarding case folding as of PHP 7.1.0,
which introduced Unicode filename support on Windows. At least
with full case foldings, "MASSE" and "MaÃe" are supposed to match,
for instance. But what would "MA?E" match? I suggest to leave it
as is. Otherwise someone would need to pursue the RFC process[1].
[1] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2009-11-13 09:54:48] RQuadling at GMail dot com
Description:
------------
I'm not sure if this is just a documentation issue or another bug for windows.
Filenames on Windows are accessible case insensitive.
If you have a file ACamelCasedFile.php, then you cannot have a file aCamelCasedFile.PHP as these are
considered to be the same name.
So, my expectation of the glob() function on Windows would be to support this aspect of the OS.
So, glob('*camel*') should return the file. Obviously it does not.
Whilst I can use bracing to supply variants, getting all the variants is a lot of effort - camel,
Camel, cAmel, CAmel, caMel, CaMel, etc.
Remember that Windows doesn't care, so neither should glob(), at least on windows.
But, having to not break BC, would introducting a new flag GLOB_CASELESS be possible?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50164&edit=1
Thread (2 messages)