ID: 21708
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Strings related
Operating System: Win 2000 Pro Russian + SP2
PHP Version: 4.3.0
New Comment:
Code:
<?
setlocale(LC_ALL,"ru_RU.cp1251");
$str = "���";
echo ucwords(strtolower($str));
?>
Result:
���
Previous Comments:
------------------------------------------------------------------------
[2003-01-17 03:49:30] [EMAIL PROTECTED]
This bug only for Win32 =)
ucwords() function once again does not work properly with strings
containing international characters.
Thus, any character following the "�"(ACSII code == 254) or "�"(ACSII
code == 222) letter will always be uppercase.
Code:
<?
setlocale(LC_CTYPE,"ru_RU.cp1251");
$str[] = "������";
$str[] = "������";
$str[] = "��������";
$str[] = "��������";
$str[] = "�������� =)";
$str[] = "����";
$str[] = "����";
for ($i=0;$i<sizeof($str);$i++) {
echo ucwords(strtolower($str[$i]))."<br>";
}
?>
Result:
������
������
��������
��������
�������� =)
����
����
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21708&edit=1