Accept 'utf8' flag in place of 'utf-8' to compensate for entries broken by bug 16841...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 30 Dec 2008 21:43:54 +0000 (21:43 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 30 Dec 2008 21:43:54 +0000 (21:43 +0000)
includes/Revision.php

index a6147ba..7938d88 100644 (file)
@@ -720,9 +720,11 @@ class Revision {
                        }
 
                        global $wgLegacyEncoding;
-                       if( $wgLegacyEncoding && !in_array( 'utf-8', $flags ) ) {
+                       if( $wgLegacyEncoding && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) ) {
                                # Old revisions kept around in a legacy encoding?
                                # Upconvert on demand.
+                               # ("utf8" checked for compatibility with some broken
+                               #  conversion scripts 2008-12-30)
                                global $wgInputEncoding, $wgContLang;
                                $text = $wgContLang->iconv( $wgLegacyEncoding, $wgInputEncoding, $text );
                        }