8000 [Console] Table counts wrong number of padding symbols in `renderCell()` method when cell contain unicode variant selector by vladimir-vv · Pull Request #60042 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Table counts wrong number of padding symbols in renderCell() method when cell contain unicode variant selector #60042

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

Open
wants to merge 2 commits into
base: 6.4
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
issues/60038: Table counts wrong number of padding symbols in method …
…renderCell(..) when cell contain unicode variant selector.
  • Loading branch information
vladimir-vv committed May 2, 2025
commit fc8f7a01e3a908871d25dc7bdcd1c541d571b481
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ private function renderCell(array $row, int $column, string $cellFormat): string

// str_pad won't work properly with multi-byte strings, we need to fix the padding
if (false !== $encoding = mb_detect_encoding($cell, null, true)) {
$width += \strlen($cell) - mb_strwidth($cell, $encoding);
$width += \strlen($cell) - mb_strwidth(str_replace(["\xef\xb8\x8f", "\xef\xb8\x8e", ], "", $cell), $encoding);
}

$style = $this->getColumnStyle($column);
Expand Down
0