Hacker News new | ask | show | jobs
by MajorBaguette 477 days ago
Some emojis require two UTF-16 code units so yep, standard

Thanks btw, I made this one as a test to see how it could perform as I can't stand terrible UI ones. I'll probably launch more. What'd you like to see next ?

1 comments

> Some emojis require two UTF-16 code units so yep, standard

But not acceptable in a "character counter", in my opinion. What exactly is the use case for this counter, since it won't align with anyone's real-world intuition for the meaning of "character"?

You're actually right, I didn't think of this.

My counter is based on JS .length and can get up to 11 characters for specific emojis while X count all emojis as 2 characters.

Thanks for highlighting this