Edit report at https://bugs.php.net/bug.php?id=18556&edit=1
ID: 18556 Comment by: sweiss at stylesight dot com Reported by: spud at nothingness dot org Summary: Setting locale to 'tr_TR' lowercases class names Status: Assigned Type: Bug Package: Scripting Engine problem Operating System: Linux (RedHat 7.2) PHP Version: 5CVS, 4CVS (2005-10-04) Assigned To: dmitry Block user comment: N Private report: N New Comment: No, the problem results because lowercase i (in most languages) and uppercase I (in most languages) are not actually considered to be the upper/lower variant of the same letter in Turkish. In Turkish, the undotted ı is the lowercase of I, and the dotted İ is the uppercase of i. If you have a class named Image, it will break if the locale is changed to turkish because class_exists() function uses zend_str_tolower(), and changes the case on all classes, because they are supposed to be case insensitive. Someone else above explained it very well: 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. Please, oh please, can someone fix this already? It has been a very long time and it's extremely annoying and difficult to work around if you have a large multilingual website. Previous Comments: ------------------------------------------------------------------------ [2011-09-15 19:51:48] robin dot bussiek at googlemail dot com I am sorry to ask this for my understanding: Is it true, that the cause for this bug lies in a false inclusion of the "I" character in the Turkish character set - and therefore results in an unnecessary replacement? If so, my green knowledge leads me to the assumption, that a fix should be rather simple. **duck**, Robin ------------------------------------------------------------------------ [2011-08-08 12:02:30] tolga at profelis dot com dot tr php -v PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011 08:24:40) Problem continues! ------------------------------------------------------------------------ [2010-08-28 12:14:34] web-coder at list dot ru Thanks to Alexey dot Rybak at gmail dot com for a patch, that fix problem if you use only ASCII-symbols in functions/methods names: http://dev.badoo.com/custom_strtolower.diff ------------------------------------------------------------------------ [2010-08-27 19:17:55] web-coder at list dot ru Please tell me php version, where this problem is already solved. Thanks. ------------------------------------------------------------------------ [2010-08-09 07:55:30] stevemw at mac dot com +1. I get complaints about the side-effects of this on a weekly basis. Especially awful if you are asked to add turkish support after the fact, when you already have a large codebase. ------------------------------------------------------------------------ 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 https://bugs.php.net/bug.php?id=18556 -- Edit this bug report at https://bugs.php.net/bug.php?id=18556&edit=1