ID: 18556 Comment by: onur dot oguzel at gmail dot com 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:
i guess nobody looks at this bug, setlocale(LC_ALL, 'tr_TR'); setlocale(LC_CTYPE, 'en_US'); sure solves this but it is still a bug :) Previous Comments: ------------------------------------------------------------------------ [2009-06-18 09:51:52] spam at pamignot dot org This bug is still alive !! Can someone have a look to this ? While it is not fixed, you can set LC_CTYPE to another locale to get it works again. ------------------------------------------------------------------------ [2009-03-05 19:28:22] cankoy at ymail dot com This also occurs in function names: <?php echo setlocale(LC_ALL, 'tr_TR')."\n"; HI5(); function HI5() { echo "Five!\n";} ?> outputs: --- tr_TR Fatal error: Call to undefined function HI5() in... --- whereas the following works OK: <?php echo setlocale(LC_ALL, 'tr_TR')."\n"; function HI5() { echo "Five!\n";} HI5(); ?> outputs: --- tr_TR Five! --- using php-cli 5.2.6 on Ubuntu 8.10. ------------------------------------------------------------------------ [2008-05-20 07:44:31] c dot muench at netz98 dot de This bug is still alive in version 5.2.5. I tested the posted script and get the same results. ------------------------------------------------------------------------ [2008-04-21 18:40:05] jreeve at pelagodesign dot com We are still getting this bug with PHP 5.2.3 PHP 5.2.3 (cli) (built: Feb 7 2008 06:40:06) As noted below, this function: <?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"; } ?> Produces this error: 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! ------------------------------------------------------------------------ [2007-08-16 17:24:36] tokul at users dot sourceforge dot net 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 ------------------------------------------------------------------------ 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