Hacker News new | ask | show | jobs
by LeonidasXIV 746 days ago
This will probably fail if the thing being chopped off is a composed emoji, like the flag emoji (where it can chop off the second letter of the ISO code and just leave a bewildering to the user but completely valid first letter) or the ZWJ sequence emojis which will leave a color or half a family or other shenanigans, depending where it cuts.
1 comments

Why is that a problem? If you cut off the country, at least you know that there was a flag. If you cut off the entire grapheme, then you know nothing!
Well, if the user entered a French flag, and then you show it back to them as a white flag, you may cause a bit of an international incident. Or worse, accusations of telling very old jokes.
I think you'd just get the first letter of the country code and not a flag at all.