X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FAsset%2FJsOptimizer.php;h=243b40294c8621826303a9c73d13c766b8fcb0d8;hb=refs%2Fheads%2Fd864;hp=6b8c217fcc57f69d0b3a2c137fb5fd2aeae5329f;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Asset/JsOptimizer.php b/web/core/lib/Drupal/Core/Asset/JsOptimizer.php index 6b8c217fc..243b40294 100644 --- a/web/core/lib/Drupal/Core/Asset/JsOptimizer.php +++ b/web/core/lib/Drupal/Core/Asset/JsOptimizer.php @@ -24,7 +24,7 @@ class JsOptimizer implements AssetOptimizerInterface { // 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'])) {