Move mbstring initializaton to Setup.php, add checks
[lhc/web/wiklou.git] / includes / Setup.php
index 2c78061..878b147 100644 (file)
@@ -45,6 +45,13 @@ if ( !isset( $wgVersion ) ) {
        die( 1 );
 }
 
+if ( function_exists( 'mb_internal_encoding' ) ) {
+       mb_internal_encoding( 'UTF-8' );
+} elseif ( !defined( 'MEDIAWIKI_INSTALL' ) ) {
+       echo "Error: the mbstring PHP extension is required\n";
+       die( 1 );
+}
+
 // Set various default paths sensibly...
 $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' );