Req #50164 [Opn]: glob is case sensitive on windows where filenames are case insensitive.

From: Date: Fri, 01 Oct 2021 13:19:45 +0000
Subject: Req #50164 [Opn]: glob is case sensitive on windows where filenames are case insensitive.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236957@lists.php.net to get a copy of this message
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)

« previous php.bugs (#236957) next »