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

Keycap emoji sequence not detected #272

Closed
tanakahisateru opened this issue Jan 29, 2018 · 6 comments
Closed

Keycap emoji sequence not detected #272

tanakahisateru opened this issue Jan 29, 2018 · 6 comments

Comments

@tanakahisateru
Copy link

tanakahisateru commented Jan 29, 2018

Below characters are not detected by twemoji.parse() because only their sequences start with 7bit ASCII characters + U+FE0F, I guess.

#️⃣ U+0023 U+FE0F U+20E3 keycap: #
*️⃣ U+002A U+FE0F U+20E3 keycap: *
0️⃣ U+0030 U+FE0F U+20E3 keycap: 0
1️⃣ U+0031 U+FE0F U+20E3 keycap: 1
2️⃣ U+0032 U+FE0F U+20E3 keycap: 2
3️⃣ U+0033 U+FE0F U+20E3 keycap: 3
4️⃣ U+0034 U+FE0F U+20E3 keycap: 4
5️⃣ U+0035 U+FE0F U+20E3 keycap: 5
6️⃣ U+0036 U+FE0F U+20E3 keycap: 6
7️⃣ U+0037 U+FE0F U+20E3 keycap: 7
8️⃣ U+0038 U+FE0F U+20E3 keycap: 8
9️⃣ U+0039 U+FE0F U+20E3 keycap: 9

https://unicode.org/emoji/charts-5.0/emoji-list.html#keycap

Additionally, also eye-with-balloon is so.
👁‍🗨 (U+1F441 U+FE0F U+200D U+1F5E8 U+FE0F) converted to 👁 and 💬

https://unicode.org/emoji/charts-5.0/emoji-list.html#1f441_fe0f_200d_1f5e8_fe0f

@tanakahisateru tanakahisateru changed the title Keycap emoji sequence not detected after v2 Keycap emoji sequence not detected Jan 29, 2018
KwanEsq added a commit to KwanEsq/twemoji-colr that referenced this issue Apr 2, 2019
In the twemoji upstream filenames the "eye in speech bubble" sequence and the
combining keycap sequences are missing the VS16 (fe0f) codepoints from their
filenames.  Fix them during processFile. (see also twitter/twemoji#272)

Fixes mozilla#45
KwanEsq added a commit to KwanEsq/twemoji-colr that referenced this issue Apr 2, 2019
In the twemoji upstream filenames the "eye in speech bubble" sequence and the
combining keycap sequences are missing the VS16 (fe0f) codepoints from their
filenames.  Fix them during processFile. (see also twitter/twemoji#272)

Fixes mozilla#45
@pleerock
Copy link

pleerock commented May 12, 2020

Issue persists for the two years... You can easily check there are no mentioned emojis in https://github.com/twitter/twemoji/tree/gh-pages/v/13.0.0/svg released a few days ago.

@sapkra
Copy link

sapkra commented May 13, 2020

The naming of the files are wrong:

For example: #️⃣

Current naming: 23-20e3.svg
Correct naming: 0023-fe0f-20e3.svg

The same problem is occurring for:

The list for the right names can be found here:
https://unicode.org/Public/emoji/13.0/emoji-test.txt

@paullaffitte
Copy link

I have (I think) the same issue with 🖌️, which is parsed as 1f58c-fe0f, but the corresponding image is available under the name 1f58c.png

@sapkra
Copy link

sapkra commented Jun 16, 2020

@n8downs Is there any plan to fix this soon?

@n8downs
Copy link
Contributor

n8downs commented Jun 24, 2020

Because our parser is generous in its matching of unqualified emoji sequences, we strip out VS16s (fe0f) for the purpose of creating asset URLs. We do not have any plans to change this design, sorry!

@n8downs n8downs closed this as completed Jun 24, 2020
@paullaffitte
Copy link

Actually, it looks that twemoji.parse is working as expected, and twemoji.convert.toCodePoint too, but only produce the valid codepoint, which is not the valid filename. You can also use twemoji-parser.

Here is an example:

import { parse } from 'twemoji-parser';
import twemoji from 'twemoji'

const emoji = '1️⃣';
console.log(
  parse(emoji), // Outputs [{"url":"https://twemoji.maxcdn.com/v/latest/svg/31-20e3.svg","indices":[0,3],"text":"1️⃣","type":"emoji"}]
  twemoji.parse(emoji), // Outputs <img class="emoji" draggable="false" alt="1️⃣" src="https://twemoji.maxcdn.com/v/12.1.6/72x72/31-20e3.png"/>
  twemoji.convert.toCodePoint(emoji) // Outputs  31-fe0f-20e3
);

I was using twemoji.convert.toCodePoint, that's why it wasn't working. But I still wonder why it would not work for you too @tanakahisateru.

surfaceflinger pushed a commit to catmoji/catmoji that referenced this issue Aug 4, 2020
In the twemoji upstream filenames the "eye in speech bubble" sequence and the
combining keycap sequences are missing the VS16 (fe0f) codepoints from their
filenames.  Fix them during processFile. (see also twitter/twemoji#272)

Fixes #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants