#45417 [NEW]: strlen count wrong with accented characters

From: Date: Wed, 02 Jul 2008 14:35:25 +0000
Subject: #45417 [NEW]: strlen count wrong with accented characters
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126205@lists.php.net to get a copy of this message
From: ponton dot leo at gmail dot com Operating system: xp PHP version: 5.2.6 PHP Bug Type: Unknown/Other Function Bug description: strlen count wrong with accented characters Description: ------------ I realize there have been similar bug reports to this. I can see why the miscount occurs, but feel that either the returned count should be true (string length) or the manual should warn that the count is apparent (byte length). Therefore, the problem is either function or documentation. Reproduce code: --------------- echo strlen('ñ'); Expected result: ---------------- expect 1 Actual result: -------------- get 2 -- Edit bug report at http://bugs.php.net/?id=45417&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45417&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45417&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45417&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45417&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45417&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45417&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45417&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45417&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45417&r=support Expected behavior: http://bugs.php.net/fix.php?id=45417&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45417&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45417&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45417&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45417&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45417&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45417&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45417&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45417&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45417&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45417&r=mysqlcfg

« previous php.bugs (#126205) next »