iamcal / emoji-data

Easy to parse data and spritesheets for emoji
MIT License
2.56k stars 301 forks source link

6.0.1 has duplicate "MAN IN TUXEDO" emoji #188

Closed wilg closed 3 years ago

wilg commented 3 years ago

I have a test that ensures that the emoji are unique, but with the latest version it fails.

iamcal commented 3 years ago

This is by-design. they are only duplicate names, because those come from Unicode where they are duplicated. They have different codepoints and different shortcodes:

New sequence:

    "name": "MAN IN TUXEDO",
    "unified": "1F935-200D-2642-FE0F",
    "non_qualified": "1F935-200D-2642",
    "image": "1f935-200d-2642-fe0f.png",
    "short_name": "man_in_tuxedo",

Old single codepoint, now used as gender neutral:

    "name": "MAN IN TUXEDO",
    "unified": "1F935",
    "image": "1f935.png",
    "short_name": "person_in_tuxedo",
wilg commented 3 years ago

OK, so I should use unified as a unique id?

iamcal commented 3 years ago

both unified and short_name will always be unique - one being the codepoints and the other the textual representation. unified is very portable, since it's just the underlying unicode codepoints, which never change