ID:               18556
 Comment by:       tokul at users dot sourceforge dot net
 Reported By:      spud at nothingness dot org
 Status:           No Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Linux (RedHat 7.2)
 PHP Version:      5CVS, 4CVS (2005-10-04)
 Assigned To:      andrei
 New Comment:

class_exists() function uses zend_str_tolower(). zend_str_tolower()
uses
zend_tolower(). zend_tolower() uses _tolower_l() on Windows and
tolower() on other oses. _tolower_l() is not locale aware. tolower() is
LC_CTYPE aware.

Turkish language can trigger some i18n programming errors in case
insensitive comparison functions, because small latin i is not equal to
capital latin i in Turkish language. Azerbaijani (az) and Kurdish (ku)
locales use Turkish language rules on Linux.

P.S. According to msdn documentation _tolower_l() is not meant to be
called directly and is provided for internal use by _totlower_l


Previous Comments:
------------------------------------------------------------------------

[2007-06-03 22:22:16] mike dot ditum at tripleplay-services dot com

I can confirm that this bug is still there... I'm testing with snapshot
php5.2-200706031230 and get the following...

Instantiating an infoBlob with a lowercase i<br>Foo<br>Instantiating an
InfoBlob with an uppercase I<br>
Fatal error: Class 'InfoBlob' not found in
/root/php5.2-200706031230/test.php on line 18

Another simple script I have discovered that shows the same problem
is...

<?php
        echo setlocale(LC_ALL, "tr_TR.utf8")."\n";
        foreach(get_declared_classes() as $class)
        {
                if(!class_exists($class))
                        echo "$class No Longer Exists!\n";
        }
?>

For this program I get the following output...

[EMAIL PROTECTED] php5.2-200706031230]# sapi/cli/php  ~/test2.php
tr_TR.utf8
DOMImplementationList No Longer Exists!
DOMImplementationSource No Longer Exists!
DOMImplementation No Longer Exists!
DOMProcessingInstruction No Longer Exists!
RecursiveIteratorIterator No Longer Exists!
IteratorIterator No Longer Exists!
FilterIterator No Longer Exists!
RecursiveFilterIterator No Longer Exists!
ParentIterator No Longer Exists!
LimitIterator No Longer Exists!
CachingIterator No Longer Exists!
RecursiveCachingIterator No Longer Exists!
NoRewindIterator No Longer Exists!
AppendIterator No Longer Exists!
InfiniteIterator No Longer Exists!
RegexIterator No Longer Exists!
RecursiveRegexIterator No Longer Exists!
EmptyIterator No Longer Exists!
ArrayIterator No Longer Exists!
RecursiveArrayIterator No Longer Exists!
SplFileInfo No Longer Exists!
DirectoryIterator No Longer Exists!
RecursiveDirectoryIterator No Longer Exists!
SimpleXMLIterator No Longer Exists!
InvalidArgumentException No Longer Exists!
__PHP_Incomplete_Class No Longer Exists!

This does not just occur with tr_TR.utf8 it also occurs with the
following locales... tr_CY.utf8, ku_TR.utf8 and az_AZ.utf8.

Thanks

------------------------------------------------------------------------

[2006-09-03 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2006-08-26 15:05:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce...

------------------------------------------------------------------------

[2006-04-10 11:04:53] [EMAIL PROTECTED]

Andrei, care to take a look?

------------------------------------------------------------------------

[2006-02-17 11:49:21] [EMAIL PROTECTED]

This bug has resurfaced in the 5.x branches since revision 1.151 of
Zend/zend_operators.h

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/18556

-- 
Edit this bug report at http://bugs.php.net/?id=18556&edit=1

Reply via email to