How country flags emojis created

In lodash source code, there's a regex string to match unicode strings, it starts with a weird stuff:


After a little search, I jumped into this article: https://thekevinscott.com/emojis-in-javascript/

It explains the regex here and I found something interesting.

These are the regional indicator symbol letters (RIS), which are used to construct country flags emojis.

Flag emojis are created by combining these RIS in the name of their country, for example, a US flag:

"US" = "\ud83c\uddfa" + "\ud83c\uddf8" = "🇺" + "🇸" = "🇺🇸"

There are some deprecated emojis as well, such as "SU" for Soviet Union, they're now separated into several emojis, just like the state.

There are also some exceptions, for example, California's emoji, they're constructed by a different combination, see here: http://unicode.org/reports/tr51/#Sample_Valid_Emoji_Tag_Sequences

Date: 2019-01-14 Mon 00:00

Author: Huy Tran

Created: 2019-04-22 Mon 14:41