From:             ww dot galen at gmail dot com
Operating system: 
PHP version:      5.4.19
Package:          mbstring related
Bug Type:         Bug
Bug description:mb title case conversion-first word in quotation isn't 
capitalized

Description:
------------
When `mb_convert_case()` is used in MB_CASE_TITLE mode, the first letter
character in a quotation immediately 
following the quotation mark isn't uppercased.

According to the Unicode 4 standard, § 3.13, when title-casing a string
the first *cased character* in a word is 
supposed to be converted to title case. In the PHP implementation
(`php_unicode_convert_case()` in 
php_unicode.c), the first *character* is converted to title case. Coupled
with the fix for #46626 (which makes 
characters in "Punctuation, Other" word characters), quotation marks are
converted to title case, rather than 
the first letter following.


Tested with PHP 5.4, but the same code is present in every version of PHP
since  5.2.7 (including 5.5) as well.

Test script:
---------------
<?php
echo mb_convert_case("\"or else it doesn't, you know. the name of the song
is called 'haddocks' eyes.'\"\n", MB_CASE_TITLE);


Expected result:
----------------
"Or Else It Doesn't, You Know. The Name Of The Song Is Called 'Haddocks'
Eyes.'"


Actual result:
--------------
"or Else It Doesn't, You Know. The Name Of The Song Is Called 'haddocks'
Eyes.'"


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65544&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65544&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65544&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65544&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65544&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65544&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65544&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65544&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65544&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65544&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65544&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65544&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65544&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65544&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65544&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65544&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65544&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65544&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65544&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65544&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65544&r=mysqlcfg

Reply via email to