diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 32650e5a9e..88162a210e 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -1151,7 +1151,7 @@ class Application $line = ''; foreach (preg_split('//u', $utf8String) as $char) { // test if $char could be appended to current line - if (mb_strwidth($line.$char) <= $width) { + if (mb_strwidth($line.$char, 'utf8') <= $width) { $line .= $char; continue; } diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt index 5605f10697..545cd7b0b4 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt @@ -1,11 +1,10 @@ - - [Exception] - コマンドの実行中に - エラーが発生しまし - た。 - + + [Exception] + コマンドの実行中にエラーが + 発生しました。 + foo