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:
Fabien Potencier 2014-05-14 15:50:58 +02:00
commit 6207389a6d
2 changed files with 6 additions and 7 deletions

View File

@ -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;
}

View File

@ -1,11 +1,10 @@
[Exception]
コマンドの実行中に
エラーが発生しまし
た。
[Exception]
コマンドの実行中にエラーが
発生しました。
foo