Skip to content

Missing support for uncombined regional modifers #154

@jquast

Description

@jquast

A small edge case, that python wcwidth (and probably others) accidentally measure correctly, that U+1F1EC and U+1F1E7 are narrow in EastAsianWidth.txt. When two are combined, a 2-cell flag emoji of the country by code is displayed.

However, when printed without a combined code, they should be width 2, but are currently measured as 1.

>>> print('|\U0001F1EC|')
|🇬|
>>> print('|\U0001F1EC|\U0001F1E7|')
|🇬|🇧|
>>> print('|\U0001F1EC\U0001F1E7|')
|🇬🇧|
>>> wcwidth.wcswidth('\U0001F1EC\U0001F1E7') == 2
True   # accidently correct
>>> wcwidth.wcswidth('\U0001F1EC') == 2
False  # should be 2

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