|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14117 Problems with ucwords(strtolower()) function
Submitted: 2001-11-19 10:45 UTC Modified: 2001-11-19 11:12 UTC
From: andregp at yahoo dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.0.6 OS: Win98/Linux-Conectiva
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.
Block user comment
Status: Assign to:
Bug Type:
From: andregp at yahoo dot com
New email:
PHP Version: OS:


 [2001-11-19 10:45 UTC] andregp at yahoo dot com
   class texto {
      var $str1='',
   $str= new texto();
   print("1:  $str->str1 <br>".
         "2:  $str->str2 <br>".
         "3:  $str->str3 <br>");

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:
// ---> THIS OK

* Sorry 'bout my poor english.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-19 10:48 UTC]
You should set the correct locale (see

If that's not the case, show us your output and tell us what you exactly expect.
 [2001-11-19 10:49 UTC]
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:50 UTC]
Not a bug -> bogus.

But yeah, if you think thats not the case, please tell us what you would expect.
 [2001-11-19 10:59 UTC] andregp at yahoo dot com
   class texto {
      var $str='';
   $str= new texto();
   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 11:03 UTC]
Then it's a locale problem, check the url posted by sander.

 [2001-11-19 11:12 UTC] andregp at yahoo dot com

The setlocale('LC_ALL','pt_BR'); works in perfect way.

And sorry annoy you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 20:01:30 2024 UTC