Skip to content

Some emoji have incorrect width #57

Closed

Description

@darrenburns

Hi, thanks for your work on this project. It's been invaluable!

According to this document emoji presentation sequences should be treated as "East Asian Wide".

[UTS51] emoji presentation sequences behave as though they were East Asian Wide, regardless of their assigned East_Asian_Width property value.

When wcwidth reads in the EastAsianWide.txt file, it discards all the emoji presentation sequences it finds, rather than treating them as being wide (since it discards everything without W or F properties).

The full list of 353 emojis affected is available at:
https://unicode.org/emoji/charts/emoji-variants.html

wcwidth will report all of the emoji in the above list as having width 1 instead of width 2.

I would be happy to PR this, but I'm not sure the master branch is clean - I noticed some walrus operators etc. despite my understanding being that this project is 2.7 compatible

Activity

  1. GalaxySnail commented on Mar 6, 2022

    @GalaxySnail
    Contributor

    I noticed some walrus operators etc. despite my understanding being that this project is 2.7 compatible

    Walrus operators and f-strings mean it can't run under python 2 (or even python 3.7). I have cleaned its python 2 compat codes in #58.

    In my opinion, python 2 compat is useless for bin/update-tables.py, because we always need the latest python for unicodedata.name in the latest unicodedata module. On python 3.10, unicodedata.unidata_version is 13.0.0, and on python 3.11 it is 14.0.0.

  2. jquast commented on Mar 8, 2022

    @jquast
    Owner

    that's correct, bin/update-tables.py is not meant to be python2 compatible, it is not distributed as part of the package.

  3. added a commit that references this issue on Oct 30, 2023
    04d6d90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions