Closed rokoroku closed 2 months ago
@rokoroku could you please create a PR adding the flags, countries, and country codes?
Thank you for your request! Unfortunately, there are two main challenges with implementing this feature:
Conceptual Issue: The [ISO 3166-1 alpha-2 (cca2)] standard, which this library is based on, does not include the flags you've mentioned. While it's technically possible to make exceptions, there's also the…
Technical Issue: Country flag emojis are made up of exactly two cca2-mapped [regional indicator symbols] (e.g., 🇬 and 🇧, which combine to form 🇬🇧). This simplicity allows for a straightforward conversion [from country code to flag] and [back] again, using just a bit of math, with country names added as a bonus.
However, the flags you're referring to, such as the flag of England 🏴, are quite different. These flags are composed of multiple characters based on the ISO 3166-2 standard:
In short, adding support for these flags would require either a completely separate codebase or filling the existing code with exceptions, which isn't ideal. For now, we'll be sticking with the current implementation.
Again, thank you for your question—I’ve learned some interesting things through this process!
🏴 Flag: England 🏴 Flag: Scotland 🏴 Flag: Wales
Above 3 emojis are added in Emoji 5.0... and I think it can be added to the library.