>>>> Is it that difficult to replace strcasecmp with locale independent >>>> case insensitive comparison function? >>> >>> We're open for patches. Feel free to send one. >> >> I am PHP developer and don't code in C. In PHP script locale insensitive >> strtolower/strtoupper can be done with one preg_replace call. > > Making PCRE a requirement for ext/date is not an option. > >> All timezone identifiers are written in plain US-ASCII. Lowercase ASCII >> characters are in 0x61-0x7A range, uppercase characters are in >> 0x41-0x5A. >> Maybe you can add 0x20 to all 0x41-0x5A byte values and use strcmp() >> instead of strcasecmp(). > > Looks way overcomplicated comparing to the Ilia's solution.
PHP needs locale insensitive strcasecmp() or your developers will continue hitting string comparison issues in Turkish and Azerbaijani. Ilia patched it in timezone parsing code. Some day other strcasecmp will pop in other place. Switching locale everytime you want to compare strings is a hack and not a bug fix. -- Tomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php