+ /**
+ * Convert character to uppercase, allowing overrides of the default mb_upper
+ * behaviour, which is buggy in many ways. Having a conversion table can be
+ * useful during transitions between PHP versions where unicode changes happen.
+ * This can make some resources unreachable on-wiki, see discussion at T219279.
+ * Providing such a conversion table can allow to manage the transition period.
+ *
+ * @since 1.34
+ *
+ * @param string $char
+ *
+ * @return string
+ */
+ protected function mbUpperChar( $char ) {
+ global $wgOverrideUcfirstCharacters;
+ if ( array_key_exists( $char, $wgOverrideUcfirstCharacters ) ) {
+ return $wgOverrideUcfirstCharacters[$char];
+ } else {
+ return mb_strtoupper( $char );
+ }
+ }
+