ID: 22415 Updated by: [EMAIL PROTECTED] Reported By: admin at naxe dot net -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Linux Red Hat v7.3 PHP Version: 4.3.0 New Comment:
Marking as bogus because this is not a bug at all... Previous Comments: ------------------------------------------------------------------------ [2003-02-25 12:41:12] michael dot mauch at gmx dot de Your LANG [EMAIL PROTECTED] uses the ISO-8859-15 character set - that's the one with the Euro sign. At character position 180 it has a "Z" with a little "v" (caron) above, and at character position it has the "z" with the little "v" (caron) above - so strtolower() is correct. See "man iso-8859-15", if your system has that man page. ------------------------------------------------------------------------ [2003-02-25 08:58:51] admin at naxe dot net Hi, thanks for your replies. As you can see on my phpinfo() I have this environment setting: LANG [EMAIL PROTECTED] I think it was from the Red Hat v7.3 installation. I tested the script, as you suggested, with LANG=C (the same language settings that I have on the other server) and it works. But I think that this behaviour is still very strange, why my setting of it_IT will produce this problem: strtolower(chr(180)) results in chr(184)? I think this is an important issue for code portability. Thanks. ------------------------------------------------------------------------ [2003-02-25 08:24:28] [EMAIL PROTECTED] And also try inserting setlocale(LC_CTYPE, "C"); on top of your script. ------------------------------------------------------------------------ [2003-02-25 08:20:41] [EMAIL PROTECTED] strtolower's behaviour depends on the locale settings (LC_CTYPE), and the settings are different on each server, so the reported behaviour seems to be quite expectable for me. Setting LANG=C would solve your problem? ------------------------------------------------------------------------ [2003-02-25 08:18:31] [EMAIL PROTECTED] from the manual page on strtolower: "Note that 'alphabetic' is determined by the current locale. " are you sure that this is not just a locale settings problem? ------------------------------------------------------------------------ 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/22415 -- Edit this bug report at http://bugs.php.net/?id=22415&edit=1