php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46607 mb_convert_case with MB_CASE_TITLE should be improved
Submitted: 2008-11-18 22:51 UTC Modified: 2016-01-07 02:51 UTC
Votes:7
Avg. Score:3.7 ± 1.4
Reproduced:6 of 6 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (16.7%)
From: kriskra at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: mbstring related
PHP Version: 5.2.6 OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kriskra at gmail dot com
New email:
PHP Version: OS:

 

 [2008-11-18 22:51 UTC] kriskra at gmail dot com
Description:
------------
mb_convert_case with MB_CASE_TITLE capitalises the 's' after an
apostrophe.

mb_convert_case with MB_CASE_TITLE capitalises the 't' after a
number.

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


Expected result:
----------------
The Apostrophe's 'S' Should Not Be Capitalised
In The 5th Century Noting Was Capitalised

Actual result:
--------------
The Apostrophe'S 'S' Should Not Be Capitalised
In The 5Th Century Noting Was Capitalised

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-21 20:45 UTC] jani@php.net
-Package: Feature/Change Request +Package: mbstring related -Operating System: CENT OS +Operating System: *
 [2016-01-04 17:00 UTC] daniel at 64studio dot com
This appears to be a duplicate of https://bugs.php.net/bug.php?id=36311

It was already fixed for straight apostrophe/quotes (HTML &#39;) in https://bugs.php.net/bug.php?id=46626 but not for the curled apostrophe/quote (HTML &rsquo;) when using PHP 7.1.0-dev from git.

Reproduce code:
---------------

<?php
echo mb_convert_case("People's issues versus people’s issues", MB_CASE_TITLE);
?>

Expected result:
----------------

People's Issues Versus People’s Issues

Actual result:
--------------

People's Issues Versus People’S Issues
 [2016-01-07 02:48 UTC] yohgaki@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: yohgaki
 [2016-01-07 02:48 UTC] yohgaki@php.net
Dup of Bug #36311
Closing this one.

https://3v4l.org/P0RGT

&rsquo; should be handled. I'll write new bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 19:01:29 2024 UTC