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

Skip to content

[Console][Table] Fix cell padding with multi-byte #12864

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
Feb 5, 2015
Merged

[Console][Table] Fix cell padding with multi-byte #12864

merged 1 commit into from
Feb 5, 2015

Conversation

ttsuruoka
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

When the TableHelper dealing with East Asian text, it renders wrong widths. This fixes that problem.

When the `TableHelper` dealing with East Asian text, it renders wrong
widths. This fixes that problem.
@stof
Copy link
Member

stof commented Dec 5, 2014

It looks to me we are going back and forth between these 2 functions (we used to use mb_strwidth at some point in the past)

@fabpot fabpot added the Console label Dec 7, 2014
@ttsuruoka
Copy link
Contributor Author

@stof Thank you for your comment!
I consider that the table cell-padding should be rendered by width of string, not length of string.
See #10714.
That PR fixed the same problem by mb_strwidth instead of mb_strlen.

@fabpot
Copy link
Member

fabpot commented Feb 5, 2015

Thank you @ttsuruoka.

@fabpot fabpot merged commit 11014c2 into symfony:2.3 Feb 5, 2015
fabpot added a commit that referenced this pull request Feb 5, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

[Console][Table] Fix cell padding with multi-byte

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

When the `TableHelper` dealing with East Asian text, it renders wrong widths. This fixes that problem.

Commits
-------

11014c2 [Console][Table] Fix cell padding with multi-byte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants