php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48871 strtoupper does not make all characters upper with proper locale set
Submitted: 2009-07-09 15:30 UTC Modified: 2009-07-10 05:27 UTC
From: sweiss at stylesight dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.3.0 OS: Debian Etch and RHEL 5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sweiss at stylesight dot com
New email:
PHP Version: OS:

 

 [2009-07-09 15:30 UTC] sweiss at stylesight dot com
Description:
------------
As reported and closed out in 

22003
21771
35583
42063

strtoupper() does not actually convert accented characters to 
uppercase, even if you do set the locale.

As PHP 5.3 was only released days ago it seems unlikely 6 will be out 
anytime soon.  If this feature isn't actually going to be there for a 
long time, then it would be much more considerate to stop stating you 
have this feature already in your documentation.  We used strtoupper 
everywhere on a 300-file localization project and had no reason to 
believe it wouldn't work through 3 different (CJK) languages until we 
got to Spanish and realized it was bogus.

Reproduce code:
---------------
var_dump(setlocale(LC_ALL, "es_MX.utf8"));
$str = "?\n";
echo(strtoupper($str));

Expected result:
----------------
string(10) "es_MX.utf8"
?

Actual result:
--------------
string(10) "es_MX.utf8"
?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-09 15:42 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

It\'s still not a bug. POSIX locales don\'t handle upper casing of UTF-8 encoded strings unfortunately. You\'ll just have to wait for PHP 6 here.
 [2009-07-10 05:27 UTC] sweiss at stylesight dot com
If I give someone software and I tell them, it works fine, just not on 
any platform you'll ever use, even though you say the software's 
compatible with my platform, I call that a bug.  If I can write a 
function to accomplish the same thing in your language within a day, 
it's a bug.  And I did read the manual, in fact, that's where I got the 
incorrect information from.  If you weren't going to tell people it 
doesn't work on most platforms on the page the function's on, exactly 
where would you deign to put this information that my lowly eyes have 
missed it?

I'm fine waiting for PHP 6.  I just want you to accurately reflect the 
functionality in the documentation so that people don't get hoodwinked 
like I did.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC