Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Asset/JsOptimizer.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Asset/JsOptimizer.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/lib/Drupal/Core/Asset/JsOptimizer.php Thu Feb 28 13:21:36 2019 +0000 @@ -24,7 +24,7 @@ // remove the BOM from the result. $data = file_get_contents($js_asset['data']); if ($encoding = (Unicode::encodingFromBOM($data))) { - $data = Unicode::substr(Unicode::convertToUtf8($data, $encoding), 1); + $data = mb_substr(Unicode::convertToUtf8($data, $encoding), 1); } // If no BOM is found, check for the charset attribute. elseif (isset($js_asset['attributes']['charset'])) {