Talk:ISO 3166-1 alpha-2

From Wikipedia, the free encyclopedia

Someone should add this [1] in? --Kaihsu 08:52, 5 Aug 2003 (UTC)

Contents

[edit] Table conversion

I've been converting a few of these massive ISO articles recently. Here's the program I used to convert this article:

// File:    convert-iso3166-alpha-2.cpp
// License: Public domain
// Author:  Ardonik
#include <fstream>
#include <iostream>
#include <string>
using namespace std;

void generate(istream& in, ostream& out) {
  out << "{| border=\"1px\" cellspacing=\"0\" cellpadding=\"2px\"\n";
  out << "|+ (Description) Two-letter Codes\n";
  out << "|- style=\"background-color: #a0d0ff;\"\n";
  out << "!Alpha-2!!Country\n";
  out << "|-\n";
  string line;
  while (getline(in, line)) {
    if (line.length() < 16) continue;
    string alpha2 = line.substr(2, 11);
    string country = line.substr(16);
    out << "|" << alpha2 << "||" << country << "\n";
    out << "|-\n";
  }
  out << "|}\n";
  if (in.fail() && !in.eof()) cout << "Could not read from input\n";
  if (out.fail()) cout << "Could not write to output\n";  
}

int main(int argc, char* argv[]) {
  if (argc != 3) {
    cout << "Usage: " << argv[0] << " [infile] [outfile]\n";
    cout << "  If infile is \"-\", input will be read from stdin.\n";
    cout << "  If outfile is \"-\", output will be written to stdout.\n";
    return 0;
  }

  string infile = argv[1], outfile = argv[2];
  if (infile == "-" && outfile == "-") {
    generate(cin, cout);
  } else if (infile == "-") {
    ofstream out(outfile.c_str());
    generate(cin, out);
  } else if (outfile == "-") {
    ifstream in(infile.c_str());    
    generate(in, cout);
  } else {
    ifstream in(infile.c_str());    
    ofstream out(outfile.c_str());    
    generate(in, out);
  }
  return 0;
}

To use it, simply copy a bulleted list from the old version of the page into a text file and run the program with the text file as the first argument and "-" as the second. Copy the resulting output and replace the old list with it.
The program's bigger than it ought to be, but I only had to run it once. --Ardonik 01:36, Aug 10, 2004 (UTC)

[edit] Why not UK?

Can anybody explain why when these codes were handed out the United Kingdom was given GB instead of UK? Edward 11:36, 2005 May 14 (UTC)

I've heard that it was because the Ukrainian SSR also wanted UK, and as a compromise neither got it. I don't know if this is really true. But it makes some sense, as the Ukrainian SSR was a UN member in its own right (despite being part of the Soviet Union), so it was entitled to a code (and was given UA). --Zundark 19:02, 14 May 2005 (UTC)
http://www.iso.org/iso/en/prods-services/iso3166ma/10faq/frequently-asked-questions.html#QS04 has the answer by the ISO 3166/MA. However, UK is still a reserved code in ISO 3166-1 for the United Kingdom.--Jusjih 05:45, 26 August 2005 (UTC)
From that article: Since name components like Republic, Kingdom, United, Federal or Democratic are used very often in country names we usually do not derive the country code elements from them in order to avoid ambiguity. However, in that case, how did the United States manage to get us as its country code? *Dan* 13:34, August 26, 2005 (UTC)
Possibly the word state is less often used and the USA (also used as ISO 3166 alpha-3 code) is rarely abbreviated as America. Mexico is officially the United Mexican States but we do not normally call it the United States.--Jusjih 00:42, 27 August 2005 (UTC)
Incidentally, uk in ISO 639-1 is Ukrainian language.--Jusjih 08:33, 26 August 2005 (UTC)
Anyone know the deal with Northern Ireland?
Northern Ireland is included under the code GB, as it is part of the United Kingdom. --Zundark 13:22, 23 May 2006 (UTC)
The ISO codes are based on the abbreviations the UN uses (this is documented on the ISO site). The UN uses abbreviations based on the geographical name of the country, not the official name, which as stated above, usually refers to its type of government. They do this to avoid implying recognition or otherwise to governments, and because the official name can change, but the geographical name changes less often. Thus, GB and not UK, FR and not RF (Republique Français, which is the abbreviation used by the French), DE and not BD (BRD = Bundesrepublik Deutschland), plus lots more. There are some exceptions, where there is no a common geographical name, just the official name. The US is one such exception, also CH (=Confederatio Helvetica, Switzerland is not an official name). --TiffaF 14:33, 14 September 2006 (UTC)
The UK was active on the internet using ".uk", before the Internet standardised as ISO-3166, that is why this is the one country that is not ISO-3166 as an Internet domain, but "uk" it is reserved to stop anybody else using it and causing more problems. --TiffaF 14:33, 14 September 2006 (UTC)

[edit] CS

Now that Serbia and Montenegro have officially split, what codes are they going to get? Denelson83 00:38, 23 May 2006 (UTC)

They haven't split yet. When they do split, the ISO 3166/MA will give them new codes. But it's difficult to guess what these codes will be, as the most appropriate ones are already taken. --Zundark 08:24, 23 May 2006 (UTC)
Well, now that they have split, I have some ideas that the ISO 3166/MA could use to code these new countries. Serbia could be "RS", while Montenegro could be "ME". Denelson83 02:42, 4 June 2006 (UTC)
I thought of RS for Serbia (with R for Republic), but the problem is that the ISO 3166/MA tries not to use words like "republic" when choosing the codes. So Serbia may end up with something like SX instead (or maybe just stay as CS, since it's the successor state - compare with WS for Samoa).
ME is also my guess for Montenegro. This code is apparently reserved for Western Sahara, but similar reservations have been ignored before. --Zundark 11:42, 4 June 2006 (UTC)
It doesn't say ME is reserved here: http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/iso_3166-1_decoding_table.html -- Denelson83 18:02, 4 June 2006 (UTC)
You're right, it's not reserved according to that table. So a lot of the information about reserved codes in the article appears to be out of date. Someone should e-mail the ISO 3166/MA for a current version of the reserve list, and update the article. --Zundark 18:27, 4 June 2006 (UTC)
That isn't necessary. The reserved list is easily derived from that table. Denelson83 22:06, 5 June 2006 (UTC)
Yes, that's true as far as the alpha-2 codes are concerned, but presumably we also want to update the information on reserved alpha-3 codes (in the ISO 3166-1 alpha-3 article). --Zundark 08:58, 6 June 2006 (UTC)
Let's not hold our collective breath. This could take a while. In 2003, the Serbia and Montenegro government took 5+ months -- from their establishment on 2003-02-04, to informing ISO3166/MA of their preferred country codes on 2003-06-06, and 2 votes over the next 6.5 weeks to come to a decision, announced 2003-07-23. (And didn't Guernsey, Jersey, and Isle of Man take 8 months?) -- Robocoder (talk | contribs) 19:37, 14 July 2006 (UTC)
I don't know about GGY, JEY and IMN -- eight months from when onwards? They've been in existence since centuries ago as separate entities, so I really don't know what happened to make them get separate ISO codes only now... Could you enlighten me? —Nightstallion (?) 13:39, 16 July 2006 (UTC)
8 months from the application date to the date of publication.
* July 2005: BSI readies proposal for submission to ISO3166/MA.[2]
* vote results: 8 yes, 2 abstain, 0 no[3]
* 2006-03-29: ISO newsletter announces inclusion of Jersey, Guernsey, and Isle of Man[4]
-- Robocoder (talk | contribs) 19:37, 17 July 2006 (UTC)
Interesting, thanks! I suppose you'll keep us up-to-date on any developments (official applications and such)? ;)Nightstallion (?) 06:03, 18 July 2006 (UTC)

[edit] SP for Serbia

User:Millosh already added "SP" for Serbia in the table in the article, contradicting the footnote about Serbia and Montenegro. This "SP" is at best a guess, at this stage. I have manually reverted. If Millosh has insider information, please provide the reference. – Kaihsu 22:04, 2 September 2006 (UTC)

I now see Serbian country codes. Self-reverting. – Kaihsu 22:09, 2 September 2006 (UTC)

It is still quite a mess here; but I will leave it for others to sort out. – Kaihsu 22:15, 2 September 2006 (UTC)

For Serbia it is ISO suggestion to Serbian government. So, speaking strictly, it shouldn't be inside of the article. But, Montenegro got even .ME root domain based on two letter code. --millosh (talk (sr:)) 14:46, 3 September 2006 (UTC)
There are two links in Serbian: [5] (about .ME) and [6] (about SP/SRB). In short, government of Montenegro gave control of .ME domain to some governmental institution. For Serbia it is more complex. Serbian authorities suggested RS for two letters code and SRB for three letters code. While ISO agreed with SRB, ISO suggested SP for two letters code. And it is just a metter of time when ISO suggestion would be accepted/implemented. --millosh (talk (sr:)) 14:51, 3 September 2006 (UTC)
Thanks for the info. It looks like ME for Montenegro is basically a done deal, while Serbia's alpha-2 code is still to be decided. I guess this holds up the whole process. ISO has to do these three things at the same time: withdraw Serbia and Montenegro's codes, release Montenegro's codes, and release Serbia's codes. Right now ISO is only ready to do the first two, and doing the first two (or either of the first two) without doing the third makes no sense. Hence, the wait.... Chanheigeorge 22:57, 3 September 2006 (UTC)

Serbia could always request CP, as in СРБИЈА... The three-letter code could then be CPJ or CPA. (Not a serious suggestion, but it would be interesting.) Lincmad 17:34, 18 September 2006 (UTC)