Skip to content

Format-Table with emojis results in misaligned table #25671

@o-l-a-v

Description

@o-l-a-v

Prerequisites

Steps to reproduce

I noticed if using emojis inside Format-Table some of the output is misaligned. Seems each emoji makes Format-Table add a space extra to the start of the next value to the right?.

[PSCustomObject[]](
    [PSCustomObject]@{
        'Emoji'  = [string] ''
        'Means'  = [string] 'Yes'
        'While'  = [string] '🛶'
        'Means2' = [string] 'Canoe'
    },
    [PSCustomObject]@{
        'Emoji'  = [string] ''
        'Means'  = [string] 'No'
        'While'  = [string] '🌵'
        'Means2' = [string] 'Cactus'

    }
) | Format-Table -AutoSize

Image

Expected behavior

Emoji Means While Means2
----- ----- ----- ------
✅    Yes   🛶    Canoe
⛔    No    🌵    Cactus

Actual behavior

Emoji Means While Means2
----- ----- ----- ------
✅     Yes   🛶    Canoe
⛔     No    🌵    Cactus

Error details

Environment data

7.5.1 x64 Windows

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.WG-Interactive-Consolethe console experienceWG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions