Skip to content

Why is a Math char but not an Emoji? #1117

Answered by BurntSushi
LuckyTurtleDev asked this question in Q&A
Discussion options

You must be logged in to vote

corresponds to U+2661.

Why is a Math char

Because of this line

2660..2663    ; Math # So   [4] BLACK SPADE SUIT..BLACK CLUB SUIT

in DerivedCoreProperties.txt provided by the Unicode consortium.

not an Emoji?

Becuase U+2661 isn't listed as an Emoji in the emoji data provided by the Unicode consortium. It is listed as Extended_Pictographic though:

2661..2662    ; Extended_Pictographic# E0.0   [2] (♡..♢)    WHITE HEART SUIT..WHITE DIAMOND SUIT

Overall, this is not a question for the regex engine. It's a question for the Unicode consortium. Moreover, I suspect this is an instance of the XY problem. I note that \p{Emoji} does not match every possible thing that a human thinks of as …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LuckyTurtleDev
Comment options

Answer selected by LuckyTurtleDev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants