diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php
index d71bb37..10ddcdf 100644
--- a/core/lib/Drupal/Core/Command/DbDumpCommand.php
+++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php
@@ -220,6 +220,9 @@ protected function getTableSchema($table) {
     // Set primary key, unique keys, and indexes.
     $this->getTableIndexes($table, $definition);
 
+    // Set table collation.
+    $this->getTableCollation($table, $definition);
+
     return $definition;
   }
 
@@ -235,7 +238,6 @@ protected function getTableIndexes($table, &$definition) {
     // Note, this query doesn't support ordering, so that is worked around
     // below by keying the array on Seq_in_index.
     $query = $this->connection->query("SHOW INDEX FROM {" . $table . "}");
-    $indexes = [];
     while (($row = $query->fetchAssoc()) !== FALSE) {
       $index_name = $row['Key_name'];
       $column = $row['Column_name'];
@@ -260,6 +262,22 @@ protected function getTableIndexes($table, &$definition) {
   }
 
   /**
+   * Set the table collation.
+   *
+   * @param string $table
+   *   The table to find indexes for.
+   * @param array &$definition
+   *   The schema definition to modify.
+   */
+  protected function getTableCollation($table, &$definition) {
+    $query = $this->connection->query("SHOW TABLE STATUS LIKE '{" . $table . "}'");
+    $data = $query->fetchAssoc();
+
+    // Set `mysql_character_set`. This will be ignored by other backends.
+    $definition['mysql_character_set'] = str_replace('_general_ci', '', $data['Collation']);
+  }
+
+  /**
    * Gets all data from a given table.
    *
    * If a table is set to be schema only, and empty array is returned.
