
COUNTRY_NUM_CODES = {
[004]="Afghanistan",
[008]="Albania, People's Socialist Republic of",
[010]="Antarctica (the territory South of 60 deg S)",
[012]="Algeria, People's Democratic Republic of",
[016]="American Samoa",
[020]="Andorra, Principality of",
[024]="Angola, Republic of",
[028]="Antigua and Barbuda",
[031]="Azerbaijan, Republic of",
[032]="Argentina, Argentine Republic",
[036]="Australia, Commonwealth of",
[040]="Austria, Republic of",
[044]="Bahamas, Commonwealth of the",
[048]="Bahrain, Kingdom of",
[050]="Bangladesh, People's Republic of",
[051]="Armenia",
[052]="Barbados",
[056]="Belgium, Kingdom of",
[060]="Bermuda",
[064]="Bhutan, Kingdom of",
[068]="Bolivia, Republic of",
[070]="Bosnia and Herzegovina",
[072]="Botswana, Republic of",
[074]="Bouvet Island (Bouvetoya)",
[076]="Brazil, Federative Republic of",
[084]="Belize",
[086]="British Indian Ocean Territory (Chagos Archipelago)",
[090]="Solomon Islands",
[092]="British Virgin Islands",
[096]="Brunei Darussalam",
[100]="Bulgaria, People's Republic of",
[104]="Myanmar",
[108]="Burundi, Republic of",
[112]="Belarus",
[116]="Cambodia, Kingdom of",
[120]="Cameroon, United Republic of",
[124]="Canada",
[132]="Cape Verde, Republic of",
[136]="Cayman Islands",
[140]="Central African Republic",
[144]="Sri Lanka, Democratic Socialist Republic of",
[148]="Chad, Republic of",
[152]="Chile, Republic of",
[156]="China, People's Republic of",
[158]="Taiwan, Province of China",
[162]="Christmas Island",
[166]="Cocos (Keeling) Islands",
[170]="Colombia, Republic of",
[174]="Comoros, Union of the",
[175]="Mayotte",
[178]="Congo, People's Republic of",
[180]="Congo, Democratic Republic of",
[184]="Cook Islands",
[188]="Costa Rica, Republic of",
[191]="Hrvatska (Croatia)",
[192]="Cuba, Republic of",
[196]="Cyprus, Republic of",
[203]="Czech Republic",
[204]="Benin, People's Republic of",
[208]="Denmark, Kingdom of",
[212]="Dominica, Commonwealth of",
[214]="Dominican Republic",
[218]="Ecuador, Republic of",
[222]="El Salvador, Republic of",
[226]="Equatorial Guinea, Republic of",
[231]="Ethiopia",
[232]="Eritrea",
[233]="Estonia",
[234]="Faeroe Islands",
[238]="Falkland Islands (Malvinas)",
[239]="South Georgia and the South Sandwich Islands",
[242]="Fiji, Republic of the Fiji Islands",
[246]="Finland, Republic of",
[250]="France, French Republic",
[254]="French Guiana",
[258]="French Polynesia",
[260]="French Southern Territories",
[262]="Djibouti, Republic of",
[266]="Gabon, Gabonese Republic",
[268]="Georgia",
[270]="Gambia, Republic of the",
[275]="Palestinian Territory, Occupied",
[276]="Germany",
[288]="Ghana, Republic of",
[292]="Gibraltar",
[296]="Kiribati, Republic of",
[300]="Greece, Hellenic Republic",
[304]="Greenland",
[308]="Grenada",
[312]="Guadaloupe",
[316]="Guam",
[320]="Guatemala, Republic of",
[324]="Guinea, Revolutionary People's Rep'c of",
[328]="Guyana, Republic of",
[332]="Haiti, Republic of",
[334]="Heard and McDonald Islands",
[336]="Holy See (Vatican City State)",
[340]="Honduras, Republic of",
[344]="Hong Kong, Special Administrative Region of China",
[348]="Hungary, Hungarian People's Republic",
[352]="Iceland, Republic of",
[356]="India, Republic of",
[360]="Indonesia, Republic of",
[364]="Iran, Islamic Republic of",
[368]="Iraq, Republic of",
[372]="Ireland",
[376]="Israel, State of",
[380]="Italy, Italian Republic",
[384]="Cote D'Ivoire, Ivory Coast, Republic of the",
[388]="Jamaica",
[392]="Japan",
[398]="Kazakhstan, Republic of",
[400]="Jordan, Hashemite Kingdom of",
[404]="Kenya, Republic of",
[408]="Korea, Democratic People's Republic of",
[410]="Korea, Republic of",
[414]="Kuwait, State of",
[417]="Kyrgyz Republic",
[418]="Lao People's Democratic Republic",
[422]="Lebanon, Lebanese Republic",
[426]="Lesotho, Kingdom of",
[428]="Latvia",
[430]="Liberia, Republic of",
[434]="Libyan Arab Jamahiriya",
[438]="Liechtenstein, Principality of",
[440]="Lithuania",
[442]="Luxembourg, Grand Duchy of",
[446]="Macao, Special Administrative Region of China",
[450]="Madagascar, Republic of",
[454]="Malawi, Republic of",
[458]="Malaysia",
[462]="Maldives, Republic of",
[466]="Mali, Republic of",
[470]="Malta, Republic of",
[474]="Martinique",
[478]="Mauritania, Islamic Republic of",
[480]="Mauritius",
[484]="Mexico, United Mexican States",
[492]="Monaco, Principality of",
[496]="Mongolia, Mongolian People's Republic",
[498]="Moldova, Republic of",
[500]="Montserrat",
[504]="Morocco, Kingdom of",
[508]="Mozambique, People's Republic of",
[512]="Oman, Sultanate of",
[516]="Namibia",
[520]="Nauru, Republic of",
[524]="Nepal, Kingdom of",
[528]="Netherlands, Kingdom of the",
[530]="Netherlands Antilles",
[533]="Aruba",
[540]="New Caledonia",
[548]="Vanuatu",
[554]="New Zealand",
[558]="Nicaragua, Republic of",
[562]="Niger, Republic of the",
[566]="Nigeria, Federal Republic of",
[570]="Niue, Republic of",
[574]="Norfolk Island",
[578]="Norway, Kingdom of",
[580]="Northern Mariana Islands",
[581]="United States Minor Outlying Islands",
[583]="Micronesia, Federated States of",
[584]="Marshall Islands",
[585]="Palau",
[586]="Pakistan, Islamic Republic of",
[591]="Panama, Republic of",
[598]="Papua New Guinea",
[600]="Paraguay, Republic of",
[604]="Peru, Republic of",
[608]="Philippines, Republic of the",
[612]="Pitcairn Island",
[616]="Poland, Polish People's Republic",
[620]="Portugal, Portuguese Republic",
[624]="Guinea-Bissau, Republic of",
[626]="Timor-Leste, Democratic Republic of",
[630]="Puerto Rico",
[634]="Qatar, State of",
[638]="Reunion",
[642]="Romania, Socialist Republic of",
[643]="Russian Federation",
[646]="Rwanda, Rwandese Republic",
[654]="St. Helena",
[659]="St. Kitts and Nevis",
[660]="Anguilla",
[662]="St. Lucia",
[666]="St. Pierre and Miquelon",
[670]="St. Vincent and the Grenadines",
[674]="San Marino, Republic of",
[678]="Sao Tome and Principe, Democratic Republic of",
[682]="Saudi Arabia, Kingdom of",
[686]="Senegal, Republic of",
[690]="Seychelles, Republic of",
[694]="Sierra Leone, Republic of",
[702]="Singapore, Republic of",
[703]="Slovakia (Slovak Republic)",
[704]="Viet Nam, Socialist Republic of",
[705]="Slovenia",
[706]="Somalia, Somali Republic",
[710]="South Africa, Republic of",
[716]="Zimbabwe",
[724]="Spain, Spanish State",
[732]="Western Sahara",
[736]="Sudan, Democratic Republic of the",
[740]="Suriname, Republic of",
[744]="Svalbard & Jan Mayen Islands",
[748]="Swaziland, Kingdom of",
[752]="Sweden, Kingdom of",
[756]="Switzerland, Swiss Confederation",
[760]="Syrian Arab Republic",
[762]="Tajikistan",
[764]="Thailand, Kingdom of",
[768]="Togo, Togolese Republic",
[772]="Tokelau (Tokelau Islands)",
[776]="Tonga, Kingdom of",
[780]="Trinidad and Tobago, Republic of",
[784]="United Arab Emirates",
[788]="Tunisia, Republic of",
[792]="Turkey, Republic of",
[795]="Turkmenistan",
[796]="Turks and Caicos Islands",
[798]="Tuvalu",
[800]="Uganda, Republic of",
[804]="Ukraine",
[807]="Macedonia, the former Yugoslav Republic of",
[818]="Egypt, Arab Republic of",
[826]="United Kingdom of Great Britain & N. Ireland",
[834]="Tanzania, United Republic of",
[840]="United States of America",
[850]="US Virgin Islands",
[854]="Burkina Faso",
[858]="Uruguay, Eastern Republic of",
[860]="Uzbekistan",
[862]="Venezuela, Bolivarian Republic of",
[876]="Wallis and Futuna Islands",
[882]="Samoa, Independent State of",
[887]="Yemen",
[891]="Serbia and Montenegro",
[894]="Zambia, Republic of"
}

function iso_country_code_name(cc)
        if COUNTRY_NUM_CODES[cc] then
           return COUNTRY_NUM_CODES[cc]
        end
        return tostring(cc)
end

