Re: [Tiki-devel] A Unicode-aware replacement for the natcasesort() function
Jean-Marc Libs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <CA++RN4ck2n_Jw=m13LFpH8Kj52Nu3UCoxWyE=hh1Nn_HwoTs7w@mail.gmail.com> |
Hi,
That's odd: I played with it (intl extension available) and it seems to me
the langage param makes no difference.
I even extended the test set:
$arr = array("BBB", "bbb", "ßb", "abb", "AAA", "äba", "xx100xx", "xx99xx",
'"abc"', '_abc', '.aba', 'ssabc', 'ssc', 'rat', 'toto');
and I always get the same sort wether $lang is de_DE, fr_FR or C:
Array
(
[4] => AAA
[10] => .aba
[5] => äba
[3] => abb
[8] => "abc"
[9] => _abc
[1] => bbb
[0] => BBB
[13] => rat
[11] => ssabc
[2] => ßb
[12] => ssc
[14] => toto
[7] => xx99xx
[6] => xx100xx
)
So… I must be misunderstanding the point of the function :-(
Cheers,
J-M
On Sat, Jul 8, 2023 at 3:54 PM Volker Wysk <post-hhF2Jplw28UoZk/[email protected]> wrote:
> Hi.
>
> Here's the next, probably final, version of the mb_natcasesort() function.
> It should be placed somewhere in the Tiki libraries. I'm not sure where.
>
> There's no mb_natsort() function, because natural languages don't order
> strings that way. See the comment at the head of the code.
>
> See the attachment.
>
> Volker
> _______________________________________________
> TikiWiki-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel