Bug #14117 Updated: Problems with ucwords(strtolower()) function
| From: | andregp at yahoo dot com | Date: | Mon, 19 Nov 2001 16:12:02 +0000 |
| Subject: | Bug #14117 Updated: Problems with ucwords(strtolower()) function | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70936@lists.php.net to get a copy of this message | ||
ID: 14117
User updated by: andregp@yahoo.com
Reported By: andregp@yahoo.com
Status: Bogus
Bug Type: Strings related
Operating System: Win98/Linux-Conectiva
PHP Version: 4.0.6
New Comment:
Thanks.
The setlocale('LC_ALL','pt_BR'); works in perfect way.
And sorry annoy you.
Previous Comments:
------------------------------------------------------------------------
[2001-11-19 11:03:49] derick@php.net
Then it's a locale problem, check the url posted by sander.
Derick
------------------------------------------------------------------------
[2001-11-19 10:59:48] andregp@yahoo.com
<?php
class texto {
var $str='';
}
$str= new texto();
$str->str='AÇÃO';
$str->str=ucwords(strtolower($str->str));
print("1: $str->str ");
?>
This is what I get in Win98(with PWS) using the script above:
1: AçÃo
And with the same script, this is what I get in Linux(with Apache):
1: AÇÃo
I expect:
1: Ação
What I do wrong?
------------------------------------------------------------------------
[2001-11-19 10:50:11] jpm@php.net
Not a bug -> bogus.
But yeah, if you think thats not the case, please tell us what you would expect.
------------------------------------------------------------------------
[2001-11-19 10:49:38] derick@php.net
Your script is buggy. You're using the original string (str1) to ucwords.
ucwords() will not lowercase any other letters.
Not a bug -> bogus
------------------------------------------------------------------------
[2001-11-19 10:48:32] sander@php.net
You should set the correct locale (see http://www.php.net/manual/en/function.setlocale.php)
If that's not the case, show us your output and tell us what you exactly expect.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14117
Edit this bug report at http://bugs.php.net/?id=14117&edit=1