Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate emoji #14

Open
treyhunner opened this issue Apr 15, 2024 · 0 comments
Open

Deduplicate emoji #14

treyhunner opened this issue Apr 15, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@treyhunner
Copy link
Owner

Some emoji have an old-style plain variant and a newer fancy variant. Both are shown in the terminal and (on my machine at least) look the same.

Example:

image

Those two will copy different character sequences though!

🗃️

versus

🗃

We just want the fancy-looking one.

Looking at the two in the REPL, it looks like a variant character is sent after one to make it fancy:

>>> import unicodedata
>>> len(x)
2
>>> len(y)
1
>>> x[-1]
'️'
>>> unicodedata.name(x[-1])
'VARIATION SELECTOR-16'

Unicode.party shows only the fancy one: https://unicode.party/?query=file

utf8.xyz shows only the unfancy one (which makes sense because it only searches characters, not multi-character glyphs: https://utf8.xyz/file

I'm not sure if Unicode Party removes the unfancy ones or if we're getting both because we currently merge the emojilib data (which powers Unicode Party) with the official Unicode Consortium's character data (which powers utf8.xyz).

@treyhunner treyhunner added enhancement New feature or request good first issue Good for newcomers labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant