Explicitly define the encoding. #10899

Merged
merged 1 commit into from May 14, 2014

Conversation

Projects
None yet
4 participants
@jakzal
Member

jakzal commented May 14, 2014

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

@@ -1151,7 +1151,7 @@ private function splitStringByWidth($string, $width)
$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, $encoding) <= $width) {

This comment has been minimized.

@stof

stof May 14, 2014

Member

should be utf8, not $encoding, as you are working on the string converted to utf8, not on the string on the original encoding

@stof

stof May 14, 2014

Member

should be utf8, not $encoding, as you are working on the string converted to utf8, not on the string on the original encoding

This comment has been minimized.

@jakzal

jakzal May 14, 2014

Member

right 😊

@jakzal

jakzal May 14, 2014

Member

right 😊

@fabpot

This comment has been minimized.

Show comment
Hide comment
@fabpot

fabpot May 14, 2014

Member

Thank you @jakzal.

Member

fabpot commented May 14, 2014

Thank you @jakzal.

@fabpot fabpot merged commit 619ff58 into symfony:2.3 May 14, 2014

0 of 2 checks passed

continuous-integration/travis-ci The Travis CI build is in progress
Details
default Success: fabbot — Pending: Travis
Details

fabpot added a commit that referenced this pull request May 14, 2014

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.

@jakzal jakzal deleted the jakzal:encoding-fix branch May 14, 2014

@denkiryokuhatsuden

This comment has been minimized.

Show comment
Hide comment
@denkiryokuhatsuden

denkiryokuhatsuden May 15, 2014

Contributor
$ phpunit -c src/Symfony/Component/Console/
OK (396 tests, 781 assertions)

THANK YOU SO MUCH!!

Contributor

denkiryokuhatsuden commented May 15, 2014

$ phpunit -c src/Symfony/Component/Console/
OK (396 tests, 781 assertions)

THANK YOU SO MUCH!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment