MtDu has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/330897 )
Change subject: Migrate away from UtfNormal in core to external UtfNormal library ...................................................................... Migrate away from UtfNormal in core to external UtfNormal library In MediaWiki version 1.25, the UtfNormal library was split into a separate wikimedia/utfnormal package. This patch changes the code to reflect this change. Bug: T153994 Change-Id: I41553a9c37f89cac552931b28940cbf81d4820e0 --- M Transliterator_body.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Transliterator refs/changes/97/330897/1 diff --git a/Transliterator_body.php b/Transliterator_body.php index 6ca93d7..862bca4 100644 --- a/Transliterator_body.php +++ b/Transliterator_body.php @@ -40,6 +40,9 @@ * Most methods are static, with the exception of those methods that must interact (at some level) * with the runtime cache of maps, everything else is stateless. */ + +use UtfNormal\Validator; + class ExtTransliterator { // These characters have been chosen because they are forbidden by MediaWiki, have no special // regex meaning, are not unicode letters, and take up only one byte. @@ -216,7 +219,7 @@ $word = Sanitizer::decodeCharReferences( $word ); if ( $flags & self::DECOMPOSE ) { - $word = UtfNormal::toNFD( $word ); + $word = Validator::toNFD( $word ); $word = preg_replace( '/./u', '$0' . self::LETTER_END, $word ); } else { $word = preg_replace( '/\X/u', '$0' . self::LETTER_END, $word ); @@ -479,7 +482,7 @@ $output = $map['rules']->replace( $word ); // Maintain MediaWiki invariant of NFC - return UtfNormal::toNFC( $output ); + return Validator::toNFC( $output ); } /** -- To view, visit https://gerrit.wikimedia.org/r/330897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41553a9c37f89cac552931b28940cbf81d4820e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Transliterator Gerrit-Branch: master Gerrit-Owner: MtDu <justin.d...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits