php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #36311 mb_convert_case with MB_CASE_TITLE could be better
Submitted: 2006-02-07 02:47 UTC Modified: 2017-07-28 12:11 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: alex at agileware dot net Assigned:
Status: Wont fix Package: mbstring related
PHP Version: 4.4.2 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alex at agileware dot net
New email:
PHP Version: OS:

 

 [2006-02-07 02:47 UTC] alex at agileware dot net
Description:
------------
mb_convert_case with MB_CASE_TITLE capitalises the 's' after an apostrophe. It could also optionally accept an array of words not to change, such as 'a', 'at', 'in', 'of', etc.

Reproduce code:
---------------
<?php
print mb_convert_case("THE APOSTROPHE'S 'S' SHOULD NOT BE CAPITALISED", MB_CASE_TITLE);
?>

Expected result:
----------------
The Apostrophe's 'S' Should Not Be Capitalised

Actual result:
--------------
The Apostrophe'S 'S' Should Not Be Capitalised

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-07 12:31 UTC] tony2001@php.net
Reclassified as feature request.
 [2008-11-18 22:47 UTC] kriskra at gmail dot com
Description:
------------
mb_convert_case with MB_CASE_TITLE capitalises the 's' after an
number.

Reproduce code:
---------------
<?php
print mb_convert_case("IN THE 5TH CENTURY NOTING WAS CAPITALISED",
MB_CASE_TITLE);
?>

Expected result:
----------------
In The 5th Century Noting Was Capitalised

Actual result:
--------------
In The 5Th Century Noting Was Capitalised
 [2011-02-21 21:34 UTC] jani@php.net
-Package: Feature/Change Request +Package: mbstring related
 [2016-01-07 08:49 UTC] daniel at 64studio dot com
The bug as originally reported was fixed in https://bugs.php.net/bug.php?id=46626

Capitalising the 'th' in 5th is a slightly different issue, and is still present in PHP 7.1.0-dev

I would suggest the title of this bug is updated.
 [2017-07-28 12:11 UTC] nikic@php.net
-Status: Open +Status: Wont fix
 [2017-07-28 12:11 UTC] nikic@php.net
As discussed in bug #65544, the behavior regarding "5th" is consistent with both the old and the new title-casing algorithms specified by Unicode, so I'm going to mark this as Won't Fix.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC