I noted that you need to do some extra work on ucfirst() since it has
no direct mb_ equivalent. You have to roll your own or pick one from
php.net since mb_convert_case() can only work like ucwords().



On Sep 16, 11:42 am, Martin Westin <[email protected]> wrote:
> Thanks for finding that one. I had not caught that before and I use
> "non-english" characters all the time. Guess Iäd better slow my
> application down by replacing all strtolower with the mb_ version...
> and possibly if clauses and things to make sure mb is installed.
>
> But have a look at php.net... it is possibly quicker to ask mysql to
> convert to lowercase than php (oh dear). It sounds incredible and I
> haven't run a test of this 
> myself.http://se2.php.net/manual/en/function.mb-strtolower.php
>
> Quick rant:
> It makes my blood boil every time PHP makes my jaw to drop to the
> floor like this. Come on! Shouldn't this kind of thing be handled by
> PHP internally? mb this and mb that. Utf8 is 8bit, single byte, is it
> not? I don't have a single setting in my installation of php that
> suggests I prefer 8859. Take a hint why don't you, you silly language!
>
> BTW, why is this in the comments on php.net:
> mb_strtolower($str, mb_detect_encoding($str));
> Why is that not built into the function? If PHP can detect the
> encoding... don't give me the option to screw it up but entering the
> wrong one! I can not come up with a single situation where I would
> want to make a string lowercase but do it badly and treat some
> characters the wrong way. Artistic reasons? I would have liked to see
> strtolower() do just that. They could have added a
> artistic_encoding_reinterpretation_strtolower() so that the 99.999% of
> calls to the function did what that name suggested.
>
> end rant.
>
> thanks again for posting this... I have some work to do :)
>
> On Sep 16, 8:04 am, Roman <[email protected]> wrote:
>
>
>
> > finally I found the solution to my problem. It was not the  issue with
> > DB either CakePHP. Problem was in PHP - low function. Never use it if
> > you use encoding different than iso-8859-1. Instead of low use
> > mb_strtolower("string", 'UTF-8").
>
> > Thanks for help.
>
> > On 15 Wrz, 14:16, brian <[email protected]> wrote:
>
> > > Also, use a terminal to verify that the data is as it should be. If
> > > all you have to work with is PHPMyAdmin, check that its pages are
> > > using UTF-8.
>
> > > It's easy, with MySQL, to import UTF-8 data that gets destroyed. If
> > > using an import file, put the following at the top:
>
> > > SET NAMES 'utf8';
>
> > > And, of course, make sure that database.php has 'encoding' => 'utf8'
> > > and that your layout has the proper character set meta tag.
>
> > > On Tue, Sep 15, 2009 at 2:06 AM, Sergei <[email protected]> wrote:
>
> > > > What DB do you use? It is not CakePHP, it 's DBMS problem.
>
> > > > If MySql, set encoding to UTF8 and DB collation to utf8_unicode_ci,
> > > > not utf8_general_ci.
>
> > > > On Sep 15, 5:11 am,Roman<[email protected]> wrote:
> > > >> Hi,
> > > >> I have created filter using paginate with extra options taken from
> > > >> input fields. Service and database use UTF-8 (checked). When I try to
> > > >> filter word with polish characters (e.g. ósma) cakephp does not return
> > > >> proper value.
> > > >> Do you have any idea ?
> > > >> Regards,
> > > >>Roman
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to