#35110 [Bgs]: bug with str_word_count

From: Date: Wed, 09 Nov 2005 08:35:09 +0000
Subject: #35110 [Bgs]: bug with str_word_count
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87906@lists.php.net to get a copy of this message
ID: 35110 User updated by: desss at yandex dot ru Reported By: desss at yandex dot ru Status: Bogus Bug Type: Strings related Operating System: winXP,Linux PHP Version: 5.0.5 New Comment: hmm...on my linux now utf-8 rus locale... it's so strange... Previous Comments: ------------------------------------------------------------------------ [2005-11-09 09:18:39] tony2001@php.net Can't reproduce on Linux with ru_RU.koi8r locale. PHP just uses isalpha() and other system functions to differentiate space chars from the others, so if it doesn't work for you - it's your system fault or you're doing something wrong. ------------------------------------------------------------------------ [2005-11-09 08:56:09] desss at yandex dot ru No. Result is 2. Not 1. ------------------------------------------------------------------------ [2005-11-09 08:44:31] tony2001@php.net 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] tony2001@php.net 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). ------------------------------------------------------------------------ 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/35110 -- Edit this bug report at http://bugs.php.net/?id=35110&edit=1

« previous php.bugs (#87906) next »