[Solved] Emoji Zero Width Joiner Sequences not rendering properly

Something silly that I noticed with statuses specifically (but seems to apply all over the site) is that emoji created by joining multiple unicode codepoints together with a Zero Width Jointer (this is used for emoji skin tones, genders, and other ‘alternate’ forms of different primary emoji codepoints) is lost when it is sent to the server.

For instance, if I set my status to the following: 🏊‍♂️ which is the “Male Swimmer” Emoji, the resulting status is displayed as 🏊♂️ which is presumably “Swimmer,” “ZWJ,” “Male Symbol,” and “Variation Selector-16,” the four codepoints for the former, next to one another rather than rendered together, possibly with the two invisible characters removed (The latter is a unicode character designed to denote that the former is a modifier, not an addition… apparently).

It’s obviously not a high priority bug by any means, but it seems strange that despite my device able to display these types of emoji natively, it gets eaten up by the time it gets back to me, hence why I think one possibility is that the non-visible characters may be getting trimmed.

Would I sound crazy if I wondered aloud if this was related to the weird ligature shenanigans we ran across earlier?

Okay, I actually tested this, after blathering about it, and it looks like it’s not a ligature thing, near as I can tell.

Ah, now I see the reason for this.
It is because of my text input filter. The server removes all unicode code points that doesn’t belong to any of the following unicode categories: L, M, N, P, S and the ASCII space character.

Basically, it only allows printable characters.

And the Zero Width Joiner (ZWJ) belongs to category C (or more specifically Cf). So it gets removed.

I can add this specific code point as an exception to fix the issue.
Thanks for the input! :smiley:

/Accipiter

Cool, that what I had suspected.

The codepoint for the “Variation Selector-16” U+FE0F probably also needs to be added as an exception, I don’t know what other ones are also used in compound emoji, but I know that one’s used in this case, so many if not all of it’s category, Mn, is probably needed as well.

“Variation Selector-16” is actually in category Mn, a subcategory of M, so it is already allowed. But I had to look it up as well, since I had the same thought!