3 ms·
I'm actually not sure what Twitter is doing, now. Putting Emoji into the box decreases the remaining character count by one for each Emoji. But putting Zalgo in
by mikeash 11y ago
I'm actually not sure what Twitter is doing, now. Putting Emoji into the box decreases the remaining character count by one for each Emoji. But putting Zalgo into the box decreases the remaining character count by several for each grapheme cluster. My head hurts.
- TazeTSchnitzel 11y agoTwitter actually counts codepoints, but after normalisation, so it doesn't matter which of the two ways you represent é: https://dev.twitter.com/overview/api/counting-characters https://dev.twitter.com/overview/api/counting-characters
- mikeash 11y agoRight, stupid me, emoji are still a single code point. Put a flag in the box, and the count decreases by two.
- TazeTSchnitzel 11y agoWell, depends on the emoji. Some use combing characters, e.g. a red heart is the black heart character plus some invisible joiner IIRC, and some of the family emoji are composed of their individual components (mom/dad/girl/boy) with joiners.
- mikeash 11y agoYes, you're right. In a fit of silliness I was testing only with the ones that are a single code point, though.