#35110 [Opn->Fbk]: bug with str_word_count

From: Date: Tue, 08 Nov 2005 10:55:21 +0000
Subject: #35110 [Opn->Fbk]: bug with str_word_count
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87840@lists.php.net to get a copy of this message
ID: 35110 Updated by: tony2001@php.net Reported By: desss at yandex dot ru -Status: Open +Status: Feedback -Bug Type: Feature/Change Request +Bug Type: Strings related Operating System: winXP,Linux PHP Version: 5.0.5 New Comment: 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). Previous Comments: ------------------------------------------------------------------------ [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=35110&edit=1

« previous php.bugs (#87840) next »