Skip to content

Column width of emoji appears incorrect #12

@FGasper

Description

@FGasper
use strict;
use warnings;

my @rows;

use v5.10;
use Term::Table;

use utf8;
push @rows, [ 'Contraseña', 'non-repair only' ];
push @rows, [ '密码',        'non-repair only' ];
push @rows, [ '🏄',          'surfing' ];

        for (
            Term::Table->new(
                header => [ 'Task', 'Type' ],
                rows   => \@rows,
            )->render
        ) {
            utf8::encode($_);
            say;
        }

… outputs:

+------------+-----------------+
| Task       | Type            |
+------------+-----------------+
| Contraseña | non-repair only |
| 密码       | non-repair only |
| 🏄          | surfing         |
+------------+-----------------+

The last row’s first column looks like it should have one fewer space?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions