Skip to content

Commit 66c5826

Browse files
committed
Merge branch '2.4'
* 2.4: Explicitly define the encoding.
2 parents 838bee3 + 24f7234 commit 66c5826

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ private function splitStringByWidth($string, $width)
11371137
$line = '';
11381138
foreach (preg_split('//u', $utf8String) as $char) {
11391139
// test if $char could be appended to current line
1140-
if (mb_strwidth($line.$char) <= $width) {
1140+
if (mb_strwidth($line.$char, 'utf8') <= $width) {
11411141
$line .= $char;
11421142
continue;
11431143
}

Tests/Fixtures/application_renderexception_doublewidth2.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11

22

3-
4-
[Exception]
5-
コマンドの実行中に
6-
エラーが発生しまし
7-
た。
8-
3+
4+
[Exception]
5+
コマンドの実行中にエラーが
6+
発生しました。
7+
98

109

1110
foo

0 commit comments

Comments
 (0)