#21708 [Fbk-Opn]: ucfirst() trouble again

2003-02-09 Thread overseas
 ID:   21708
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Win 2000 Pro Russian + SP2
 PHP Version:  4.3.0
 New Comment:

Yes. I tried to do it after reading your comment dated 17 Jan 4:50am
(with link to MSDN). Output is wrong, but...
Every time starting of script containing 
setlocale (LC_CTYPE, Russian_Russia.1251) I  have different (!!!)
results... Interest, isn't it?


Previous Comments:


[2003-02-09 10:45:14] [EMAIL PROTECTED]

To [EMAIL PROTECTED]:

Could you also try
setlocale(LC_CTYPE, Russian_Russia.1251?




[2003-01-28 04:43:28] [EMAIL PROTECTED]

$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);



[2003-01-17 16:00:29] [EMAIL PROTECTED]

Hmm, you can use mb_convert_case() instead if mbstring extension is
enabled.

http://www.php.net/mb_convert_case




[2003-01-17 15:12:22] [EMAIL PROTECTED]

Thank's. I tried to do this. No effect. =(

I think it can be feature of PHP under Win32 ;-)



[2003-01-17 04:50:28] [EMAIL PROTECTED]

Try this:
setlocale(LC_CTYPE,Russian.1251);

Windows locale string convension is different to *nix's.

See
http://msdn.microsoft.com/library/en-us/vccore98/html/_crt_language_and_country_strings.asp


for detail.




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/21708

-- 
Edit this bug report at http://bugs.php.net/?id=21708edit=1




#21708 [Fbk-Opn]: ucfirst() trouble again

2003-01-17 Thread overseas
 ID:   21708
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Win 2000 Pro Russian + SP2
 PHP Version:  4.3.0
 New Comment:

Thank's. I tried to do this. No effect. =(

I think it can be feature of PHP under Win32 ;-)


Previous Comments:


[2003-01-17 04:50:28] [EMAIL PROTECTED]

Try this:
setlocale(LC_CTYPE,Russian.1251);

Windows locale string convension is different to *nix's.

See
http://msdn.microsoft.com/library/en-us/vccore98/html/_crt_language_and_country_strings.asp


for detail.




[2003-01-17 04:18:46] [EMAIL PROTECTED]

Code:
?
setlocale(LC_ALL,ru_RU.cp1251);
$str = ÞËÀ;
echo ucwords(strtolower($str));
?

Result:

Þëà



[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;$isizeof($str);$i++) { 
echo ucwords(strtolower($str[$i])).br; 
} 
? 

Result:

Ïðîñòî 
ÒþÐüìà 
ËþÁîâíèê 
ËþÁîâíèê 
Ëóáîâíèê =) 
ËþÄè 
ËþÄè 





-- 
Edit this bug report at http://bugs.php.net/?id=21708edit=1