|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-17 03:49 UTC] overseas at mtu-net dot ru
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:
??????
??????
????????
????????
???????? =)
????
????
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 04:00:02 2025 UTC |
$text = '<script language="JavaScript" type="text/JavaScript"> alert ("this shouldnt be here"); </script>'; $text =strip_tags($text, $allowed_tags); $text =ucfirst($text); print $text; PHP version 4.3 on win 32. doesnt uppercase output alert ("this shouldnt be here");