#35110 [Fbk-Opn]: bug with str_word_count

2005-11-08 Thread desss at yandex dot ru
 ID:   35110
 User updated by:  desss at yandex dot ru
 Reported By:  desss at yandex dot ru
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: winXP,Linux
 PHP Version:  5.0.5
 New Comment:

yes...for Win32 need to write setlocale(LC_ALL, 'rus_RUS');. echo
var_dump(setlocale(LC_ALL, 'rus_RUS')); return string(19)
Russian_Russia.1251. (on Linux  - string(5) ru_RU.)


Previous Comments:


[2005-11-08 11:55:19] [EMAIL PROTECTED]

1) there is no ru_RU locale on Win32.
2) it can be missing on Linux too.

So check the setlocale() result first (use var_dump(setlocale()) for
that).



[2005-11-05 11:19:50] desss at yandex dot ru

Description:

Code: 

setlocale(LC_ALL, 'ru_RU');
echo str_word_count(ìÿòíàÿ);

Result - 2 !!! Wrong!

That is because function understanding letter ÿ as whitespace. 

Reproduce code:
---
setlocale(LC_ALL, 'ru_RU');
echo str_word_count(ìÿòíàÿ);

Expected result:

1

Actual result:
--
2





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


#35110 [Fbk-Opn]: bug with str_word_count

2005-11-08 Thread desss at yandex dot ru
 ID:   35110
 User updated by:  desss at yandex dot ru
 Reported By:  desss at yandex dot ru
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: winXP,Linux
 PHP Version:  5.0.5
 New Comment:

No. Result is 2. Not 1.


Previous Comments:


[2005-11-09 08:44:31] [EMAIL PROTECTED]

So it *does* work, right ?



[2005-11-09 08:40:37] desss at yandex dot ru

yes...for Win32 need to write setlocale(LC_ALL, 'rus_RUS');. echo
var_dump(setlocale(LC_ALL, 'rus_RUS')); return string(19)
Russian_Russia.1251. (on Linux  - string(5) ru_RU.)



[2005-11-08 11:55:19] [EMAIL PROTECTED]

1) there is no ru_RU locale on Win32.
2) it can be missing on Linux too.

So check the setlocale() result first (use var_dump(setlocale()) for
that).



[2005-11-05 11:19:50] desss at yandex dot ru

Description:

Code: 

setlocale(LC_ALL, 'ru_RU');
echo str_word_count(ìÿòíàÿ);

Result - 2 !!! Wrong!

That is because function understanding letter ÿ as whitespace. 

Reproduce code:
---
setlocale(LC_ALL, 'ru_RU');
echo str_word_count(ìÿòíàÿ);

Expected result:

1

Actual result:
--
2





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