Collation: Allow uppercase letters in UCA collations' names
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 22 Feb 2017 20:17:54 +0000 (21:17 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 22 Feb 2017 20:17:54 +0000 (21:17 +0100)
We have several such collations defined in IcuCollation:

* bs-Cyrl
* de-AT@collation=phonebook
* fr-CA
* sr-Latn

They couldn't actually be used.

Change-Id: I3a62073583c49d3e90910aa8240fe9fcc0682386

includes/collation/Collation.php

index 7659d6c..d67bc7e 100644 (file)
@@ -67,7 +67,7 @@ abstract class Collation {
                                return new CollationFa;
                        default:
                                $match = [];
-                               if ( preg_match( '/^uca-([a-z@=-]+)$/', $collationName, $match ) ) {
+                               if ( preg_match( '/^uca-([A-Za-z@=-]+)$/', $collationName, $match ) ) {
                                        return new IcuCollation( $match[1] );
                                }