Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO 3166-2 #1

Open
Crissov opened this issue Mar 13, 2017 · 0 comments
Open

ISO 3166-2 #1

Crissov opened this issue Mar 13, 2017 · 0 comments

Comments

@Crissov
Copy link

Crissov commented Mar 13, 2017

Unicode Emoji 5.0 is now in beta stage, due to be released with Unicode 10.0 in June 2017. It defines Tag sequences for subregion flags.

// pseudo code
string function subregionEmojiFlag(string code /*example: "GB-SCT" = Scotland */)
  var emoji = U(0x1F3F4); /* Waving Black Flag */
  var (region, subregion) = code.toLower().split("-");
  for each (codepoint in region+subregion)
    emoji += U(codepoint.lowercase & 0xE0000);
  emoji += U(0xE007F); /* ETS terminator Tag Cancel */
  return emoji;
}

You may as well just support it right now, since it is – sadly – very unlikely there will be further changes. (A previous proposal used the Waving White Flag U+1F3F3 instead, like the Rainbow Flag ZWJ Sequence does, but it requires U+FE0F Variation Selector 16 to be rendered as an emoji reliably.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant