- From: 一丝 via GitHub <sysbot+gh@w3.org>
- Date: Fri, 27 Sep 2024 09:02:51 +0000
- To: public-css-archive@w3.org
I've been doing some research on this recently, and from what I can tell, [Unicode tr51](https://www.unicode.org/reports/tr51/) doesn't solve the problem very well, so I'll excerpt a quote from the `emoji-regex-xs` library: > ES2018 added support for matching Unicode properties in regular expressions with \p{…}, so you might think this problem is now trivial, given that the list of supported properties includes Emoji, Emoji_Presentation, Emoji_Modifier, Emoji_Modifier_Base, Emoji_Component, and Extended_Pictographic. But no. On their own, none of these are what you want. > ES2024 added support for matching multicharacter Unicode properties of strings with \p{…}, so you might think one of the new properties Basic_Emoji, Emoji_Keycap_Sequence, RGI_Emoji_Modifier_Sequence, RGI_Emoji_Flag_Sequence, RGI_Emoji_Tag_Sequence, RGI_Emoji_ZWJ_Sequence, or RGI_Emoji will do the trick. Well, kind of. RGI_Emoji indeed seems like what we want, but unfortunately, some common-sense and broadly-supported emoji are not officially in the "RGI" (Recommended for General Interchange) list. And even more frustratingly, some emoji are commonly used in an underqualified or overqualified way (by including or excluding certain invisible Unicode markers) that prevents them from being matched by RGI_Emoji. For example, the iOS emoji keyboard overqualifies certain emoji. So we need something that matches everything in RGI_Emoji, and more. We need a new proposal for a definitive solution, and [proposal L2/22-160](https://www.unicode.org/L2/L2022/22160-rgi-emoji-qual.pdf)(RGI_Emoji_Qualification, by @macchiati ) looks promising. @mathiasbynens has been working on improving regular expressions for Emoji matching, and he presents a [similar idea here](https://github.com/mathiasbynens/emoji-test-regex-pattern/issues/7). -- GitHub Notification of comment by yisibl Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4573#issuecomment-2378802840 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 27 September 2024 09:02:52 UTC