php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60425 php 5.3.3 - Duild Date: Jul 21 2010 20:00:47
Submitted: 2011-12-01 14:19 UTC Modified: 2012-02-10 23:38 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ol_b at meta dot ua Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.3.8 OS: Windows XP SP3
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ol_b at meta dot ua
New email:
PHP Version: OS:

 

 [2011-12-01 14:19 UTC] ol_b at meta dot ua
Description:
------------
ucwords() - Uppercase the first character of each word in a string - doesn't work with UTF-8 Cyrillic text.

http://cs10006.vk.com/u17937332/128685919/y_64c60ec2.jpg

Test script:
---------------
<?php
    header('Content-Type: text/html; charset=utf-8');

    echo ucwords('test test test');  //Test Test Test

    echo ucwords('тест тест тест');  //тест тест тест
?>

<?php
    header('Content-Type: text/html; charset=windows-1251');
    //phpinfo();
    echo ucwords('test test test');  //Test Test Test
    echo "<br>";
    echo ucwords('тест тест тест');  //Тест Тест Тест
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-01 15:23 UTC] ol_b at meta dot ua
Header shows file charset.
 [2012-01-17 12:33 UTC] mike@php.net
-Package: Output Control +Package: Strings related
 [2012-02-10 23:38 UTC] johannes@php.net
-Status: Open +Status: Not a bug
 [2012-02-10 23:38 UTC] johannes@php.net
The function works, as all of "core" PHP on binary data. You can use mb_convert_case with MB_CASE_TITLE option for non-ASCII text.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC