#34407 [NEW]: ucwords and Title Case
| From: | peebidj at hotmail dot com | Date: | Wed, 07 Sep 2005 11:32:47 +0000 |
| Subject: | #34407 [NEW]: ucwords and Title Case | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84618@lists.php.net to get a copy of this message | ||
From: peebidj at hotmail dot com
Operating system: All
PHP version: 4.4.0
PHP Bug Type: Strings related
Bug description: ucwords and Title Case
Description:
------------
Non alphanumeric characters are influencing the functionality of
strtolower and ucwords. When a character in the example is right after a
parenthesis, that character is not seen as the first in the word, and
hence is not capitalized. This was reported and dismissed earlier,
however, I feel that this is something that needs to be looked at, since
common sense tells us that any non-alphanumeric character cannot be
capitilized.
Reproduce code:
---------------
$foo = "Krung Thep (Bangkok)";
$bar = ucwords(strtolower($foo));
echo $foo;
Expected result:
----------------
Krung Thep (Bangkok)
Actual result:
--------------
Krung Thep (bangkok)
--
Edit bug report at http://bugs.php.net/?id=34407&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34407&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34407&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34407&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34407&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34407&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34407&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34407&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34407&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34407&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34407&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34407&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34407&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34407&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34407&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34407&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34407&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34407&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34407&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34407&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34407&r=mysqlcfg