#42590 [Opn->Csd]: ucwords doesn't work correctly, when a word is preceded by verticaltab/formfeed

From: Date: Sun, 09 Sep 2007 16:34:56 +0000
Subject: #42590 [Opn->Csd]: ucwords doesn't work correctly, when a word is preceded by verticaltab/formfeed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117333@lists.php.net to get a copy of this message
ID: 42590 Updated by: iliaa@php.net Reported By: kraghuba at in dot ibm dot com -Status: Open +Status: Closed Bug Type: Strings related Operating System: linux, windows PHP Version: 5CVS-2007-09-07 (snap) New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-09-07 16:10:39] kraghuba at in dot ibm dot com Description: ------------ ucwords() fails to change the first char of a word to uppercase when word is preceded by vertical tab(\v) or formfeed(\f). As per the documentation at http://in.php.net/manual/en/function.ucwords.php it should change the first char to uppercase. This is applicable to php5 as well as php6 Reproduce code: --------------- <?php $str = "testing \vucw\ford \vfunc\vtion"; var_dump( ucwords($str) ); ?> Expected result: ---------------- char preceded with \v and \f should be changed to uppercase. Actual result: -------------- string(31) "Testing \vucw\ford \vfunc\vtion" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42590&edit=1

« previous php.bugs (#117333) next »