countries icon indicating copy to clipboard operation
countries copied to clipboard

Incorrect handling of GB alpha2 codes for main countries

Open joh-ku opened this issue 8 months ago • 2 comments

When searching for countries.ByName("scotland") the return value is GB.

For Scotland the correct ISO-3166-2 code should be GB-SCT instead. Same applies for all other main countries in UK, which don't have a parent subdivision.

Those are:

  1. England -> GB-ENG
  2. Northern Ireland -> GB-NIR
  3. Scotland -> GB-SCT
  4. Wales -> GB-WLS

See https://www.iso.org/obp/ui/#iso:code:3166:GB.

I'm happy to provide a PR, if the change is accepted.

joh-ku avatar Jun 01 '24 09:06 joh-ku