MysqlInstaller: use default character set of utf8
authorKarun Dambiec <karun.84@gmx.de>
Fri, 7 Jun 2013 13:53:12 +0000 (15:53 +0200)
committerKevin Israel <pleasestand@live.com>
Tue, 24 Sep 2013 01:14:34 +0000 (21:14 -0400)
Bug: 14931
Change-Id: Ied512a75d17b401206b6439f289fe36c01536cec

RELEASE-NOTES-1.22
includes/installer/MysqlInstaller.php

index 44b1d36..4fb948a 100644 (file)
@@ -312,6 +312,8 @@ production.
 * (bug 26811) On DB error pages, server hostnames are now hidden when both
   $wgShowHostnames and $wgShowSQLErrors are false.
 * (bug 6200) line breaks in <blockquote> are handled like they are in <div>
+* (bug 14931) Default character set now set to 'utf8' when a new MySQL
+  database is created.
 
 === API changes in 1.22 ===
 * (bug 25553) The JSON output formatter now leaves forward slashes unescaped
index e0bf3d7..c0b5243 100644 (file)
@@ -89,8 +89,10 @@ class MysqlInstaller extends DatabaseInstaller {
                return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
                        Html::openElement( 'fieldset' ) .
                        Html::element( 'legend', array(), wfMessage( 'config-db-wiki-settings' )->text() ) .
-                       $this->getTextBox( 'wgDBname', 'config-db-name', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
-                       $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
+                       $this->getTextBox( 'wgDBname', 'config-db-name', array( 'dir' => 'ltr' ),
+                               $this->parent->getHelpBox( 'config-db-name-help' ) ) .
+                       $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array( 'dir' => 'ltr' ),
+                               $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
                        Html::closeElement( 'fieldset' ) .
                        $this->getInstallUserBox();
        }
@@ -475,7 +477,7 @@ class MysqlInstaller extends DatabaseInstaller {
                $conn = $status->value;
                $dbName = $this->getVar( 'wgDBname' );
                if ( !$conn->selectDB( $dbName ) ) {
-                       $conn->query( "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ), __METHOD__ );
+                       $conn->query( "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ) . "CHARACTER SET utf8", __METHOD__ );
                        $conn->selectDB( $dbName );
                }
                $this->setupSchemaVars();