Why Do Flag Emoji Count As Two Characters?

Tom Scott · 1.2M views · 2014 · 3:22

Open on YouTube

Programming language designWeb developmentexplainer

Why Stack Overflow recommends it

Stack Overflow users link it when explaining that flag emoji are really two Unicode code points, which trips up length limits, storage and rendering on older platforms.

Recommended by 1 people across 1 different months, 2017 to 2021.

What it is

A 3-minute Tom Scott explainer on why national flag emoji take up two characters in a tweet. He shows that each flag is a pair of regional indicator symbols that software combines into one image, and that devices without flag fonts just show two letters.

What people said

Recommends acw · 2021-11 · Stack Overflow · on “Django - How to store emojis in postgres DB properly?”

Like in the comments suggested, you need to put quotes around the emojis since they're just chars. Though, something like flags is actually two chars. So that's something to be careful about. All your computer is doing is converting unicode to a rendered emoji that's platform dependent. The emojis that you're using should be unicode supported. On your computer, they're definitely supported. For the most part, additional unicode support for new emojis is very quickly implemented once published on client machines. There should be no problem with emojis in strings. This is a nice video kinda explaining emojis by Tom Scott who keeps getting interviews about emojis: [this video] I'm not an expert so p

Cites Fransebas · 2017-07 · Stack Overflow · on “Emojis displaying in Android API 25 but not in 17”

Thanks, I was wondering if there were some easy solution, I think I'll use images instead and no in this case there is no small blue rectangle, in my case there are two letter instead of the flag, here is why [this video] =)

Cites Dharman · 2018-12 · Stack Overflow · on “Maxlength of HTML input with UTF8 supplementary characters”

Yeah it gets even worse with Flags. Try to paste ``, only one is possible due to the fact that this is double dual code point character. Why Do Flag Emoji Count As Two Characters? [this video]