# -*- coding: iso-8859-15 -*-
# ISO-3166 alpha country codes - ver 1
ISO3166CountryCodesAlpha= { "ABW":"Aruba",\
			 "AFG":"Afghanistan",\
			 "AGO":"Angola",\
			 "AIA":"Anguilla",\
			 "ALA":"Åland Islands",\
			 "ALB":"Albania",\
			 "AND":"Andorra",\
			 "ANT":"Netherlands Antilles",\
			 "ARE":"United Arab Emirates",\
			 "ARG":"Argentina",\
			 "ARM":"Armenia",\
			 "ASM":"American Samoa",\
			 "ATA":"Antarctica",\
			 "ATF":"French Southern Territories",\
			 "ATG":"Antigua and Barbuda",\
			 "AUS":"Australia",\
			 "AUT":"Austria",\
			 "AZE":"Azerbaijan",\
			 "BDI":"Burundi",\
			 "BDR":"Bundesdruckerei",\
			 "BEL":"Belgium",\
			 "BEN":"Benin",\
			 "BFA":"Burkina Faso",\
			 "BGD":"Bangladesh",\
			 "BGR":"Bulgaria",\
			 "BHR":"Bahrain",\
			 "BHS":"Bahamas",\
			 "BIH":"Bosnia and Herzegovina",\
			 "BLR":"Belarus",\
			 "BLZ":"Belize",\
			 "BMU":"Bermuda",\
			 "BOL":"Bolivia",\
			 "BRA":"Brazil",\
			 "BRB":"Barbados",\
			 "BRN":"Brunei Darussalam",\
			 "BTN":"Bhutan",\
			 "BVT":"Bouvet Island",\
			 "BWA":"Botswana",\
			 "CAF":"Central African Republic",\
			 "CAN":"Canada",\
			 "CCK":"Cocos (Keeling) Islands",\
			 "CHE":"Switzerland",\
			 "CHL":"Chile",\
			 "CHN":"China",\
			 "CIV":"Côte d'Ivoire",\
			 "CMR":"Cameroon",\
			 "COD":"Congo, the Democratic Republic of the",\
			 "COG":"Congo",\
			 "COK":"Cook Islands",\
			 "COL":"Colombia",\
			 "COM":"Comoros",\
			 "CPV":"Cape Verde",\
			 "CRI":"Costa Rica",\
			 "CUB":"Cuba",\
			 "CXR":"Christmas Island",\
			 "CYM":"Cayman Islands",\
			 "CYP":"Cyprus",\
			 "CZE":"Czech Republic",\
			 "DEU":"Germany",\
			 # for brain-damaged german passports
			 "D":"Germany",\
			 "DJI":"Djibouti",\
			 "DMA":"Dominica",\
			 "DNK":"Denmark",\
			 "DOM":"Dominican Republic",\
			 "DZA":"Algeria",\
			 "ECU":"Ecuador",\
			 "EGY":"Egypt",\
			 "ERI":"Eritrea",\
			 "ESH":"Western Sahara",\
			 "ESP":"Spain",\
			 "EST":"Estonia",\
			 "ETH":"Ethiopia",\
			 "FIN":"Finland",\
			 "FJI":"Fiji",\
			 "FLK":"Falkland Islands (Malvinas)",\
			 "FRA":"France",\
			 "FRO":"Faroe Islands",\
			 "FSM":"Micronesia, Federated States of",\
			 "GAB":"Gabon",\
			 "GBR":"United Kingdom",\
			 "GEO":"Georgia",\
			 "GGY":"Guernsey",\
			 "GHA":"Ghana",\
			 "GIB":"Gibraltar",\
			 "GIN":"Guinea",\
			 "GLP":"Guadeloupe",\
			 "GMB":"Gambia",\
			 "GNB":"Guinea-Bissau",\
			 "GNQ":"Equatorial Guinea",\
			 "GRC":"Greece",\
			 "GRD":"Grenada",\
			 "GRL":"Greenland",\
			 "GTM":"Guatemala",\
			 "GUF":"French Guiana",\
			 "GUM":"Guam",\
			 "GUY":"Guyana",\
			 "HKG":"Hong Kong",\
			 "HMD":"Heard Island and McDonald Islands",\
			 "HND":"Honduras",\
			 "HRV":"Croatia",\
			 "HTI":"Haiti",\
			 "HUN":"Hungary",\
			 "IDN":"Indonesia",\
			 "IMN":"Isle of Man",\
			 "IND":"India",\
			 "IOT":"British Indian Ocean Territory",\
			 "IRL":"Ireland",\
			 "IRN":"Iran, Islamic Republic of",\
			 "IRQ":"Iraq",\
			 "ISL":"Iceland",\
			 "ISR":"Israel",\
			 "ITA":"Italy",\
			 "JAM":"Jamaica",\
			 "JEY":"Jersey",\
			 "JOR":"Jordan",\
			 "JPN":"Japan",\
			 "KAZ":"Kazakhstan",\
			 "KEN":"Kenya",\
			 "KGZ":"Kyrgyzstan",\
			 "KHM":"Cambodia",\
			 "KIR":"Kiribati",\
			 "KNA":"Saint Kitts and Nevis",\
			 "KOR":"Korea, Republic of",\
			 "KWT":"Kuwait",\
			 "LAO":"Lao People's Democratic Republic",\
			 "LBN":"Lebanon",\
			 "LBR":"Liberia",\
			 "LBY":"Libyan Arab Jamahiriya",\
			 "LCA":"Saint Lucia",\
			 "LIE":"Liechtenstein",\
			 "LKA":"Sri Lanka",\
			 "LSO":"Lesotho",\
			 "LTU":"Lithuania",\
			 "LUX":"Luxembourg",\
			 "LVA":"Latvia",\
			 "MAC":"Macao",\
			 "MAR":"Morocco",\
			 "MCO":"Monaco",\
			 "MDA":"Moldova, Republic of",\
			 "MDG":"Madagascar",\
			 "MDV":"Maldives",\
			 "MEX":"Mexico",\
			 "MHL":"Marshall Islands",\
			 "MKD":"Macedonia, the former Yugoslav Republic of",\
			 "MLI":"Mali",\
			 "MLT":"Malta",\
			 "MMR":"Myanmar",\
			 "MNE":"Montenegro",\
			 "MNG":"Mongolia",\
			 "MNP":"Northern Mariana Islands",\
			 "MOZ":"Mozambique",\
			 "MRT":"Mauritania",\
			 "MSR":"Montserrat",\
			 "MTQ":"Martinique",\
			 "MUS":"Mauritius",\
			 "MWI":"Malawi",\
			 "MYS":"Malaysia",\
			 "MYT":"Mayotte",\
			 "NAM":"Namibia",\
			 "NCL":"New Caledonia",\
			 "NER":"Niger",\
			 "NFK":"Norfolk Island",\
			 "NGA":"Nigeria",\
			 "NIC":"Nicaragua",\
			 "NIU":"Niue",\
			 "NLD":"Netherlands",\
			 "NOR":"Norway",\
			 "NPL":"Nepal",\
			 "NRU":"Nauru",\
			 "NZL":"New Zealand",\
			 "OMN":"Oman",\
			 "PAK":"Pakistan",\
			 "PAN":"Panama",\
			 "PCN":"Pitcairn",\
			 "PER":"Peru",\
			 "PHL":"Philippines",\
			 "PLW":"Palau",\
			 "PNG":"Papua New Guinea",\
			 "POL":"Poland",\
			 "PRI":"Puerto Rico",\
			 "PRK":"Korea, Democratic People's Republic of",\
			 "PRT":"Portugal",\
			 "PRY":"Paraguay",\
			 "PSE":"Palestinian Territory, Occupied",\
			 "PYF":"French Polynesia",\
			 "QAT":"Qatar",\
			 "REU":"Réunion",\
			 "ROU":"Romania",\
			 "RUS":"Russian Federation",\
			 "RWA":"Rwanda",\
			 "SAU":"Saudi Arabia",\
			 "SDN":"Sudan",\
			 "SEN":"Senegal",\
			 "SGP":"Singapore",\
			 "SGS":"South Georgia and the South Sandwich Islands",\
			 "SHN":"Saint Helena",\
			 "SJM":"Svalbard and Jan Mayen",\
			 "SLB":"Solomon Islands",\
			 "SLE":"Sierra Leone",\
			 "SLV":"El Salvador",\
			 "SMR":"San Marino",\
			 "SOM":"Somalia",\
			 "SPM":"Saint Pierre and Miquelon",\
			 "SRB":"Serbia",\
			 "STP":"Sao Tome and Principe",\
			 "SUR":"Suriname",\
			 "SVK":"Slovakia",\
			 "SVN":"Slovenia",\
			 "SWE":"Sweden",\
			 "SWZ":"Swaziland",\
			 "SYC":"Seychelles",\
			 "SYR":"Syrian Arab Republic",\
			 "TCA":"Turks and Caicos Islands",\
			 "TCD":"Chad",\
			 "TGO":"Togo",\
			 "THA":"Thailand",\
			 "TJK":"Tajikistan",\
			 "TKL":"Tokelau",\
			 "TKM":"Turkmenistan",\
			 "TLS":"Timor-Leste",\
			 "TON":"Tonga",\
			 "TTO":"Trinidad and Tobago",\
			 "TUN":"Tunisia",\
			 "TUR":"Turkey",\
			 "TUV":"Tuvalu",\
			 "TWN":"Taiwan, Province of China",\
			 "TZA":"Tanzania, United Republic of",\
			 "UGA":"Uganda",\
			 "UKR":"Ukraine",\
			 "UMI":"United States Minor Outlying Islands",\
			 "URY":"Uruguay",\
			 "USA":"United States",\
			 "UTO":"Utopia",\
			 "UZB":"Uzbekistan",\
			 "VAT":"Holy See (Vatican City State)",\
			 "VCT":"Saint Vincent and the Grenadines",\
			 "VEN":"Venezuela",\
			 "VGB":"Virgin Islands, British",\
			 "VIR":"Virgin Islands, U.S.",\
			 "VNM":"Viet Nam",\
			 "VUT":"Vanuatu",\
			 "WLF":"Wallis and Futuna",\
			 "WSM":"Samoa",\
			 "YEM":"Yemen",\
			 "ZAF":"South Africa",\
			 "ZMB":"Zambia",\
			 "ZWE":"Zimbabwe",\
			 "UNO":"United Nations Organization",\
			 "UNA":"United Nations specialized agency official",\
			 "XXA":"Stateless",\
			 "XXB":"Refugee",\
			 "XXC":"Refugee (non-convention)",\
			 "XXX":"Unspecified / Unknown",\
			}

# combined ISO-3166 country and icar.org manufacturer codes
ISO3166CountryCodes= {'004':'Afghanistan',\
		      '248':'Åland Islands',\
		      '008':'Albania',\
		      '012':'Algeria',\
		      '016':'American Samoa',\
		      '020':'Andorra',\
		      '024':'Angola',\
		      '660':'Anguilla',\
		      '010':'Antarctica',\
		      '028':'Antigua and Barbuda',\
		      '032':'Argentina',\
		      '051':'Armenia',\
		      '533':'Aruba',\
		      '036':'Australia',\
		      '040':'Austria',\
		      '031':'Azerbaijan',\
		      '044':'Bahamas',\
		      '048':'Bahrain',\
		      '050':'Bangladesh',\
		      '052':'Barbados',\
		      '112':'Belarus',\
		      '056':'Belgium',\
		      '084':'Belize',\
		      '204':'Benin',\
		      '060':'Bermuda',\
		      '064':'Bhutan',\
		      '068':'Bolivia',\
		      '070':'Bosnia and Herzegovina',\
		      '072':'Botswana',\
		      '074':'Bouvet Island',\
		      '076':'Brazil',\
		      '086':'British Indian Ocean Territory',\
		      '096':'Brunei Darussalam',\
		      '100':'Bulgaria',\
		      '854':'Burkina Faso',\
		      '108':'Burundi',\
		      '116':'Cambodia',\
		      '120':'Cameroon',\
		      '124':'Canada',\
		      '132':'Cape Verde',\
		      '136':'Cayman Islands',\
		      '140':'Central African Republic',\
		      '148':'Chad',\
		      '152':'Chile',\
		      '156':'China',\
		      '162':'Christmas Island',\
		      '166':'Cocos (Keeling) Islands',\
		      '170':'Colombia',\
		      '174':'Comoros',\
		      '178':'Congo',\
		      '180':'Congo, the Democratic Republic of the',\
		      '184':'Cook Islands',\
		      '188':'Costa Rica',\
		      '384':'Côte d\'Ivoire',\
		      '191':'Croatia',\
		      '192':'Cuba',\
		      '196':'Cyprus',\
		      '203':'Czech Republic',\
		      '208':'Denmark',\
		      '262':'Djibouti',\
		      '212':'Dominica',\
		      '214':'Dominican Republic',\
		      '218':'Ecuador',\
		      '818':'Egypt',\
		      '222':'El Salvador',\
		      '226':'Equatorial Guinea',\
		      '232':'Eritrea',\
		      '233':'Estonia',\
		      '231':'Ethiopia',\
		      '238':'Falkland Islands (Malvinas)',\
		      '234':'Faroe Islands',\
		      '242':'Fiji',\
		      '246':'Finland',\
		      '250':'France',\
		      '254':'French Guiana',\
		      '258':'French Polynesia',\
		      '260':'French Southern Territories',\
		      '266':'Gabon',\
		      '270':'Gambia',\
		      '268':'Georgia',\
		      '276':'Germany',\
		      '288':'Ghana',\
		      '292':'Gibraltar',\
		      '300':'Greece',\
		      '304':'Greenland',\
		      '308':'Grenada',\
		      '312':'Guadeloupe',\
		      '316':'Guam',\
		      '320':'Guatemala',\
		      '831':'Guernsey',\
		      '324':'Guinea',\
		      '624':'Guinea-Bissau',\
		      '328':'Guyana',\
		      '332':'Haiti',\
		      '334':'Heard Island and McDonald Islands',\
		      '336':'Holy See (Vatican City State)',\
		      '340':'Honduras',\
		      '344':'Hong Kong',\
		      '348':'Hungary',\
		      '352':'Iceland',\
		      '356':'India',\
		      '360':'Indonesia',\
		      '364':'Iran, Islamic Republic of',\
		      '368':'Iraq',\
		      '372':'Ireland',\
		      '833':'Isle of Man',\
		      '376':'Israel',\
		      '380':'Italy',\
		      '388':'Jamaica',\
		      '392':'Japan',\
		      '832':'Jersey',\
		      '400':'Jordan',\
		      '398':'Kazakhstan',\
		      '404':'Kenya',\
		      '296':'Kiribati',\
		      '408':'Korea, Democratic People\'s Republic of',\
		      '410':'Korea, Republic of',\
		      '414':'Kuwait',\
		      '417':'Kyrgyzstan',\
		      '418':'Lao People\'s Democratic Republic',\
		      '428':'Latvia',\
		      '422':'Lebanon',\
		      '426':'Lesotho',\
		      '430':'Liberia',\
		      '434':'Libyan Arab Jamahiriya',\
		      '438':'Liechtenstein',\
		      '440':'Lithuania',\
		      '442':'Luxembourg',\
		      '446':'Macao',\
		      '807':'Macedonia, the former Yugoslav Republic of',\
		      '450':'Madagascar',\
		      '454':'Malawi',\
		      '458':'Malaysia',\
		      '462':'Maldives',\
		      '466':'Mali',\
		      '470':'Malta',\
		      '584':'Marshall Islands',\
		      '474':'Martinique',\
		      '478':'Mauritania',\
		      '480':'Mauritius',\
		      '175':'Mayotte',\
		      '484':'Mexico',\
		      '583':'Micronesia, Federated States of',\
		      '498':'Moldova, Republic of',\
		      '492':'Monaco',\
		      '496':'Mongolia',\
		      '499':'Montenegro',\
		      '500':'Montserrat',\
		      '504':'Morocco',\
		      '508':'Mozambique',\
		      '104':'Myanmar',\
		      '516':'Namibia',\
		      '520':'Nauru',\
		      '524':'Nepal',\
		      '528':'Netherlands',\
		      '530':'Netherlands Antilles',\
		      '540':'New Caledonia',\
		      '554':'New Zealand',\
		      '558':'Nicaragua',\
		      '562':'Niger',\
		      '566':'Nigeria',\
		      '570':'Niue',\
		      '574':'Norfolk Island',\
		      '580':'Northern Mariana Islands',\
		      '578':'Norway',\
		      '512':'Oman',\
		      '586':'Pakistan',\
		      '585':'Palau',\
		      '275':'Palestinian Territory, Occupied',\
		      '591':'Panama',\
		      '598':'Papua New Guinea',\
		      '600':'Paraguay',\
		      '604':'Peru',\
		      '608':'Philippines',\
		      '612':'Pitcairn',\
		      '616':'Poland',\
		      '620':'Portugal',\
		      '630':'Puerto Rico',\
		      '634':'Qatar',\
		      '638':'Réunion',\
		      '642':'Romania',\
		      '643':'Russian Federation',\
		      '646':'Rwanda',\
		      '654':'Saint Helena',\
		      '659':'Saint Kitts and Nevis',\
		      '662':'Saint Lucia',\
		      '666':'Saint Pierre and Miquelon',\
		      '670':'Saint Vincent and the Grenadines',\
		      '882':'Samoa',\
		      '674':'San Marino',\
		      '678':'Sao Tome and Principe',\
		      '682':'Saudi Arabia',\
		      '686':'Senegal',\
		      '688':'Serbia',\
		      '690':'Seychelles',\
		      '694':'Sierra Leone',\
		      '702':'Singapore',\
		      '703':'Slovakia',\
		      '705':'Slovenia',\
		      '090':'Solomon Islands',\
		      '706':'Somalia Somalia',\
		      '710':'South Africa',\
		      '239':'South Georgia and the South Sandwich Islands',\
		      '724':'Spain',\
		      '144':'Sri Lanka',\
		      '736':'Sudan',\
		      '740':'Suriname',\
		      '744':'Svalbard and Jan Mayen',\
		      '748':'Swaziland',\
		      '752':'Sweden',\
		      '756':'Switzerland',\
		      '760':'Syrian Arab Republic',\
		      '158':'Taiwan, Province of China',\
		      '762':'Tajikistan',\
		      '834':'Tanzania, United Republic of',\
		      '764':'Thailand',\
		      '626':'Timor-Leste',\
		      '768':'Togo',\
		      '772':'Tokelau',\
		      '776':'Tonga',\
		      '780':'Trinidad and Tobago',\
		      '788':'Tunisia',\
		      '792':'Turkey',\
		      '795':'Turkmenistan',\
		      '796':'Turks and Caicos Islands',\
		      '798':'Tuvalu',\
		      '800':'Uganda',\
		      '804':'Ukraine',\
		      '784':'United Arab Emirates',\
		      '826':'United Kingdom',\
		      '840':'United States',\
		      '581':'United States Minor Outlying Islands',\
		      '858':'Uruguay',\
		      '860':'Uzbekistan',\
		      '548':'Vanuatu',\
		      '862':'Venezuela',\
		      '704':'Viet Nam',\
		      '092':'Virgin Islands, British',\
		      '850':'Virgin Islands, U.S.',\
		      '876':'Wallis and Futuna',\
		      '732':'Western Sahara',\
		      '887':'Yemen',\
		      '894':'Zambia',\
		      '716':'Zimbabwe',\
		      '985':'MANUF: Destron Fearing / Digital Angel Corporation',\
		      '984':'MANUF: Nedap',\
		      '983':'MANUF: Texas Instruments',\
		      '982':'MANUF: Allflex',\
		      '981':'MANUF: Datamars',\
		      '980':'MANUF: AGRIDENT BV',\
		      '979':'MANUF: Earlsmere I.D.',\
		      '978':'MANUF: IER SA',\
		      '977':'MANUF: Avid',\
		      '976':'MANUF: Gemplus',\
		      '975':'MANUF: Sokymat',\
		      '974':'MANUF: Impro',\
		      '973':'MANUF: Fujihira',\
		      '972':'MANUF: Planet ID',\
		      '971':'MANUF: Alfa Laval Agri',\
		      '970':'MANUF: Amphenol',\
		      '969':'MANUF: Caisley',\
		      '968':'MANUF: AEG',\
		      '967':'MANUF: Rfdynamics',\
		      '966':'MANUF: PetCode',\
		      '965':'MANUF: 4D Technology Co. Ltd.',\
		      '964':'MANUF: Rumitag S.L.',\
		      '963':'MANUF: Korth Eletro Mecanica LTDA',\
		      '962':'MANUF: DigiTag A/S',\
		      '961':'MANUF: Mannings I.A.I.D.',\
		      '960':'MANUF: Chevillot',\
		      '959':'MANUF: Global ID Technologies',\
		      '958':'MANUF: Pet ID',\
		      '957':'MANUF: Innoceramics',\
		      '956':'MANUF: Trovan Ltd.',\
		      '955':'MANUF: Reseaumatique',\
		      '954':'MANUF: Ryeflex',\
		      '953':'MANUF: Cromasa',\
		      '952':'MANUF: JECTA',\
		      '951':'MANUF: Leader Products Pty Ltd',\
		      '950':'MANUF: SPLICE do Brasil Telecomunicacoes e Eletronica S.A.',\
		      '949':'MANUF: Y-Tex Corporation',\
		      '948':'MANUF: H. Hauptner und Richard Herberholz GmbH & Co. KG',\
		      '947':'MANUF: BELCAM. ID',\
		      '946':'MANUF: Advanced Ceramics Limited',\
		      '945':'MANUF: Business Inception Identification B.V.',\
		      '944':'MANUF: Net & Telligent SA',\
		      '943':'MANUF: E-Mark Technologie & Development',\
		      '942':'MANUF: Zee Tags',\
		      '941':'MANUF: Felixcan S.L.',\
		      '940':'MANUF: Shearwell Data Ltd.',\
		      '939':'MANUF: RealTrace',\
		      '938':'MANUF: INSVET',\
		      '937':'MANUF: ID & Traceback Systems AS',\
		      '936':'MANUF: CROVET, S.L.',\
		      '935':'MANUF: VeriLogik, Inc.',\
		      '900':'MANUF: Shared (see http://www.icar.org/manufacturer_codes.htm)',\
		      '1022':'UNREGISTERED MANUF: VeriChip Corporation'}
