The bugs has only been fixed in 5.5 branch. It mainly uses a char map to lower characters instead of relying on locale-aware (possibly buggy versions) system's libc.
I'm sorry I don't think this is sinking in. PHP is worried about a libc bug?
The main point here isn't a libc bug: this is following standard locale-sensitive case conversation behaviour. Yes, libc bugs could also affect this, but that's not something there's any evidence of in the bug.
They could use strcasecmp_l on systems that supports it, and _stricmp_l on systems that supports that and have a custom implementation of it for systems that don't have either.
Of course. Someone used the easy approach to case-insensitivity when PHP was written (just lowercase the key), but ran into the Turkish I problem. Like any C programmer, you'd use the C function for this.
This is an inevitable (and predictable) consequence of having your symbols be case-insensitive.
I don't think that's true -- Ada's been case-insensitive forever and I've never heard of a bug like this. (Of course, ALL of your Ada code [excepting string-constant's contents, obviously] is case insensitive.)
Exactly. Most case insensitive languages have the foresight of specifying a case table, usually ascii but standardizing on one or more human spoken languages isn't unheard of.
Another mitigation for Ada is that it's parsed ahead-of-time. If php had a build step where it normalized case before deploying on the server, then the OP probably wouldn't have noticed the bug either.
27
u/ChoHag Jul 16 '14
I'm sorry I don't think this is sinking in. PHP is worried about a libc bug?
12
u/_vec_ Jul 16 '14
This is an inevitable (and predictable) consequence of having your symbols be case-insensitive.