|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-11-19 10:45 UTC] andregp at yahoo dot com
<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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 03:00:02 2025 UTC |
<?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?Thanks. The setlocale('LC_ALL','pt_BR'); works in perfect way. And sorry annoy you.