#35110 [NEW]: bug with str_word_count

From: Date: Sat, 05 Nov 2005 10:19:50 +0000
Subject: #35110 [NEW]: bug with str_word_count
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87612@lists.php.net to get a copy of this message
From:             desss at yandex dot ru
Operating system: winXP,Linux
PHP version:      5.0.5
PHP Bug Type:     Strings related
Bug description:  bug with str_word_count

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 bug report at http://bugs.php.net/?id=35110&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35110&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35110&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35110&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35110&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35110&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35110&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35110&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35110&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35110&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35110&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=35110&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=35110&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35110&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35110&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35110&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35110&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35110&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35110&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35110&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35110&r=mysqlcfg


Thread (7 messages)

« previous php.bugs (#87612) next »