#48871 [Bgs]: strtoupper does not make all characters upper with proper locale set
| From: | sweiss at stylesight dot com | Date: | Fri, 10 Jul 2009 05:27:47 +0000 |
| Subject: | #48871 [Bgs]: strtoupper does not make all characters upper with proper locale set | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2466@lists.php.net to get a copy of this message | ||
ID: 48871
User updated by: sweiss at stylesight dot com
Reported By: sweiss at stylesight dot com
Status: Bogus
-Bug Type: I18N and L10N related
+Bug Type: Documentation problem
Operating System: Debian Etch and RHEL 5
PHP Version: 5.3.0
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2009-07-09 15:42:08] 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-09 15:30:43] 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"
á
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48871&edit=1