You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
My main concern is the fact the lib may return an ISO code with more than 2 characters. Some database or code may react badly, because value will exceed field capacity
So, what about a new method ? that will provide such an extended code that will return the existing 2 letter code except for these variants.
So keep returning iso code to GB for existing method. Scotland is part of GB after all.
If someone asks the country code of Scotland they would expect getting GB I think.
When searching for
countries.ByName("scotland")
the return value isGB
.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:
See https://www.iso.org/obp/ui/#iso:code:3166:GB.
I'm happy to provide a PR, if the change is accepted.
The text was updated successfully, but these errors were encountered: