Преглед на файлове

[Console] added mb_detect_encoding when needed

Fabien Potencier преди 14 години
родител
ревизия
06804d3f1d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/Symfony/Component/Console/Application.php

+ 1 - 1
src/Symfony/Component/Console/Application.php

@@ -697,7 +697,7 @@ class Application
     {
         $strlen = function ($string)
         {
-            return function_exists('mb_strlen') ? mb_strlen($string) : strlen($string);
+            return function_exists('mb_strlen') ? mb_strlen($string, mb_detect_encoding($string)) : strlen($string);
         };
 
         do {