bug #10899 Explicitly define the encoding. (jakzal)
This PR was merged into the 2.3 branch.
Discussion
----------
Explicitly define the encoding.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Credits for discovering it go to @nicolas-grekas. Cheers!
Travis for PHP 5.6 cannot be enabled yet as there's one more test failing.
re #10714 #10714
Commits
-------
619ff58
Explicitly define the encoding.
This commit is contained in:
commit
6207389a6d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
|
||||
|
||||
[Exception]
|
||||
コマンドの実行中に
|
||||
エラーが発生しまし
|
||||
た。
|
||||
|
||||
|
||||
[Exception]
|
||||
コマンドの実行中にエラーが
|
||||
発生しました。
|
||||
|
||||
|
||||
|
||||
foo
|
||||
|
|
Reference in New Issue