Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Explicitly define the encoding. #10899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2014
Merged

Explicitly define the encoding. #10899

merged 1 commit into from
May 14, 2014

Conversation

jakzal
Copy link
Contributor

@jakzal 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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right 😊

@fabpot
Copy link
Member

fabpot commented May 14, 2014

Thank you @jakzal.

@fabpot fabpot merged commit 619ff58 into symfony:2.3 May 14, 2014
fabpot added a commit that referenced this pull request May 14, 2014
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 encoding-fix branch May 14, 2014 13:51
@denkiryokuhatsuden
Copy link
Contributor

$ 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants