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

Please add support for Kosovo (XK) #45

Closed
willemstuursma opened this issue Jun 20, 2018 · 6 comments
Closed

Please add support for Kosovo (XK) #45

willemstuursma opened this issue Jun 20, 2018 · 6 comments

Comments

@willemstuursma
Copy link

From Wikipedia:

The code XK is being used by the European Commission, the IMF, and SWIFT, CLDR and other organizations as a temporary country code for Kosovo.

@alcohol
Copy link
Member

alcohol commented Jun 20, 2018

While this would be an accurate and welcome addition, I am not sure how to deal with the fact that there is no temporary alpha3 code nor a temporary numerical code, making the dataset rather incomplete.

@willemstuursma
Copy link
Author

Yes it's a bit tricky.

How about this approach: the reality seems to be that there is a valid alpha2 code and not a valid alpha3 or numerical code, so the library should reflect that.

@willemstuursma
Copy link
Author

It seems that the Kosovo passport uses RKS as the alpha-3 code.

@mvdpanne
Copy link

mvdpanne commented Jul 2, 2018

Hmm, I would argue that is probably best to keep it out of the library, as it is not officially part of the ISO 3166-1 standard. At this point in time, theoretically everyone can implement it as they wish. In practice, I have seen it being assigned the same numeric code as Serbia.

Interesting comment about it here: mledoze/countries#126 (comment)

In my opinion, the safest bet is to leave it to the users of this library to interpret XK the way they need to. It is a so-called user-assigned code element (see https://en.wikipedia.org/wiki/ISO_3166-1#Reserved_and_user-assigned_code_elements). So, if Kosovo is at some point officially added to the standard, it will probably not keep using that alpha-2 code.

@alcohol
Copy link
Member

alcohol commented Jul 2, 2018

Also, in practical terms, you could simply decorate or wrap my class and override the relevant methods where you want to return additional, new and/or different data when given specific input value(s).

For now, I will not be adding it until it becomes fully official.

@alcohol alcohol closed this as completed Jul 2, 2018
@davidjeddy
Copy link

As an option https://geonames.wordpress.com/2010/03/08/xk-country-code-for-kosovo/ states “If users need code elements to represent country names not included in this part of ISO 3166, the series of letters AA, QM to QZ, XA to XZ, and ZZ, and the series AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ respectively and the series of numbers 900 to 999 are available.”

This may give us a valid way to add the codes, then update them when the codes are officially added.

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

4 participants