Implement NumericUppercaseCollation
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 27 Jul 2016 14:43:01 +0000 (16:43 +0200)
committerKaldari <rkaldari@wikimedia.org>
Tue, 23 Aug 2016 18:41:01 +0000 (18:41 +0000)
commit3b84eb02c2ded04e8819ac5bbdb5c99505e63682
treee6a1df2a3be3f52cbe8e1fd9a8b6884b1d5c2576
parent75ea8471b8aeb90cef841d0e2cfd7a7e86137a09
Implement NumericUppercaseCollation

This collation orders text with numbers "naturally", so that
'Foo 1' < 'Foo 2' < 'Foo 12'.

Note that this only works in terms of sequences of digits, and the
behavior for decimal fractions or pretty-formatted numbers may be
unexpected.

This is only expected to work mostly correctly for English-language
text. Consider it a proof of concept. You probably want to use
an UCA collation with '-u-kn' suffix rather than this.

Bug: T8948
Change-Id: Ie268f2d92c5c75d0aaecf54ede2bdda1af3b309d
RELEASE-NOTES-1.28
autoload.php
includes/collation/Collation.php
includes/collation/NumericUppercaseCollation.php [new file with mode: 0644]