8000 [Console] Wrong width of cells containing multi-byte strings in TableHelper · Issue #8284 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Wrong width of cells containing multi-byte strings in TableHelper #8284

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

Closed
damner opened this issue Jun 14, 2013 · 0 comments
Closed

Comments

@damner
Copy link
Contributor
damner commented Jun 14, 2013

To reproduce, create a table like this:

<?php
$table = $this->getHelperSet()->get('table');
$table->setHeaders(array('Ф'));
$table->setRows(array(array('11111')));
$table->render($output);

result:

+-------+
| Ф    |
+-------+
| 11111 |
+-------+

The problem is in using str_pad() function in method renderCell().
The function does not work correctly with multi-byte strings.

fabpot added a commit that referenced this issue Jun 16, 2013
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Fixed the table rendering with multi-byte strings.

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

Commits
-------

ab1439e [Console] Fixed the table rendering with multi-byte strings.
@fabpot fabpot closed this as completed Jun 16, 2013
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

No branches or pull requests

2 participants
0