ID: 14117
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Strings related
Operating System: Win98/Linux-Conectiva
PHP Version: 4.0.6
New Comment:
<?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?
Previous Comments:
------------------------------------------------------------------------
[2001-11-19 10:50:11] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
[2001-11-19 10:45:40] [EMAIL PROTECTED]
<html>
<body>
<?php
class texto {
var $str1='',
$str2='',
$str3='';
}
$str= new texto();
$str->str1='A��O';
$str->str2=strtolower($str->str1);
$str->str3=ucwords($str->str1);
print("1: $str->str1 <br>".
"2: $str->str2 <br>".
"3: $str->str3 <br>");
?>
</body>
</html>
Expected $str->str3 = 'A��o', but isn't what I get.
When I use this functions in strigs that are outside a object, this error don't
happens.
In instance:
<?php
$str1='A��O';
$str2=strtolower($str1);
$str3=ucwords($str2);
?>
// ---> THIS OK
* Sorry 'bout my poor english.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14117&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]