diff --git a/core/lib/Drupal/Component/Utility/Unicode.php b/core/lib/Drupal/Component/Utility/Unicode.php
index 4938b0d..bd50e6e 100644
--- a/core/lib/Drupal/Component/Utility/Unicode.php
+++ b/core/lib/Drupal/Component/Utility/Unicode.php
@@ -164,15 +164,28 @@ public static function check() {
       return 'mbstring.encoding_translation';
     }
     // mbstring.http_input and mbstring.http_output are deprecated and empty by
-    // default in PHP 5.6.
-    if (version_compare(PHP_VERSION, '5.6.0') == -1) {
-      if (ini_get('mbstring.http_input') != 'pass') {
+    // default in PHP 5.6, so the ini_get will return an empty value. On earlier
+    // versions, these must be set to 'pass'.
+    // No need to check for mbstring.internal_encoding as we set it to UTF-8
+    // ourselves later on in this method.
+    $settings_pass = ['mbstring.http_input', 'mbstring.http_output'];
+    foreach ($settings_pass as $setting_pass) {
+      $setting_pass_value = ini_get($setting_pass);
+      if (!empty($setting_pass_value) || $setting_pass_value != 'pass') {
         static::$status = static::STATUS_ERROR;
-        return 'mbstring.http_input';
+        return $setting_pass;
       }
-      if (ini_get('mbstring.http_output') != 'pass') {
+    }
+    // Newly introduced variables in PHP 5.6. Must be either empty or set to
+    // UTF-8.
+    $settings_utf8 = ['internal_encoding', 'input_encoding', 'output_encoding'];
+    // These must be set to UTF-8 or empty as they are deprecated as of PHP 5.6:
+    $settings_utf8 += ['iconv.internal_encoding', 'iconv.output_encoding'];
+    foreach ($settings_utf8 as $setting_utf8) {
+      $setting_utf8_value = strtolower(ini_get($setting_utf8));
+      if (!empty($setting_utf8_value = ini_get($setting_utf8_value)) || $setting_pass_value != 'utf-8') {
         static::$status = static::STATUS_ERROR;
-        return 'mbstring.http_output';
+        return $setting_utf8;
       }
     }
 
