1 charset_converter.inc public DatabaseCharsetConverter::__construct($charset = NULL, $collation = NULL)

DatabaseCharsetConverter constructor.

Parameters

string $charset: (Optional) The character set to be used. Defaults to "utf8mb4".

string $collation: (Optional) The collation to be used. Defaults to "utf8mb4_general_ci".

File

core/includes/database/charset_converter.inc, line 55

Class

DatabaseCharsetConverter
Character set converter for database tables.

Code

public function __construct($charset = NULL, $collation = NULL) {
  if ($charset) {
    $this->charset = $charset;
  }
  if ($collation) {
    $this->collation = $collation;
  }

  // Default to the default connection.
  $this->connection = Database::getConnection();
}