Prüfen, ob Country Code in Europa ist?

Hallo zusammen,

gibt es eine einfache Möglichkeit, ob ein Country Code (DE zB) innerhalb Europa ist?
Gibt es vllt einen Webservice, der einem bekannt ist?

Andere Ideen (außer die Info selbst zu pflegen) ?

Danke
 
K

kneitzel

Es gibt eine Website, mit der man sowas suchen kann. Mal bei Google nach Country Code Europe gesucht?

Da findet man dann z.B.

Und ja, das würde ich dann durchaus selbst pflegen. Abhängigkeit zu anderen webservices würde ich immer minimieren so möglich.

Edit: etwas erweiterte Suche gibt das auch als Datenbank / Tabelle, z.B. https://datahub.io/JohnSnowLabs/country-and-continent-codes-list
 
K

kneitzel

Ich hatte zwei Edits: ich würde keinen externen Webservice nutzen, denn du rennst sofort in Probleme, wenn die sich ändern oder mal nicht erreichbar sind,

Und die Daten selbst gibt es auch als csv Datei oder so, den Link hatte ich auch noch dazu getan.
 
K

kneitzel

Gerne, und sorry für den etwas ruppigen Start. War nicht so gemeint und liegt nur an einem blöden Migräne-Anfall, der mir den Samstag vermiest. Bist hier mit allen Fragen immer herzlich willkommen.
 
Oh, dann mal gute Besserung.
An dieser Stelle auch einfach mal ein großes Dankeschön für dieses Forum und auch der Umgang hier bzgl. Fragen / Anfängerfragen.
 
Hier bitte
Java:
import java.io.IOException;
import java.util.Locale;

public class Co {
	public static String[][] sa = { { "AF", "Asia", "Southern Asia" }, { "AX", "Europe", "Northern Europe" },
			{ "AL", "Europe", "Southern Europe" }, { "DZ", "Africa", "Northern Africa" },
			{ "AS", "Oceania", "Polynesia" }, { "AD", "Europe", "Southern Europe" },
			{ "AO", "Africa", "Sub-Saharan Africa" }, { "AI", "Americas", "Latin America and the Caribbean" },
			{ "AQ", "", "" }, { "AG", "Americas", "Latin America and the Caribbean" },
			{ "AR", "Americas", "Latin America and the Caribbean" }, { "AM", "Asia", "Western Asia" },
			{ "AW", "Americas", "Latin America and the Caribbean" }, { "AU", "Oceania", "Australia and New Zealand" },
			{ "AT", "Europe", "Western Europe" }, { "AZ", "Asia", "Western Asia" },
			{ "BS", "Americas", "Latin America and the Caribbean" }, { "BH", "Asia", "Western Asia" },
			{ "BD", "Asia", "Southern Asia" }, { "BB", "Americas", "Latin America and the Caribbean" },
			{ "BY", "Europe", "Eastern Europe" }, { "BE", "Europe", "Western Europe" },
			{ "BZ", "Americas", "Latin America and the Caribbean" }, { "BJ", "Africa", "Sub-Saharan Africa" },
			{ "BM", "Americas", "Northern America" }, { "BT", "Asia", "Southern Asia" },
			{ "BQ", "Americas", "Latin America and the Caribbean" },
			{ "BO", "Americas", "Latin America and the Caribbean" }, { "BA", "Europe", "Southern Europe" },
			{ "BW", "Africa", "Sub-Saharan Africa" }, { "BV", "Americas", "Latin America and the Caribbean" },
			{ "BR", "Americas", "Latin America and the Caribbean" }, { "IO", "Africa", "Sub-Saharan Africa" },
			{ "BN", "Asia", "South-eastern Asia" }, { "BG", "Europe", "Eastern Europe" },
			{ "BF", "Africa", "Sub-Saharan Africa" }, { "BI", "Africa", "Sub-Saharan Africa" },
			{ "CV", "Africa", "Sub-Saharan Africa" }, { "KH", "Asia", "South-eastern Asia" },
			{ "CM", "Africa", "Sub-Saharan Africa" }, { "CA", "Americas", "Northern America" },
			{ "KY", "Americas", "Latin America and the Caribbean" }, { "CF", "Africa", "Sub-Saharan Africa" },
			{ "TD", "Africa", "Sub-Saharan Africa" }, { "CL", "Americas", "Latin America and the Caribbean" },
			{ "CN", "Asia", "Eastern Asia" }, { "CX", "Oceania", "Australia and New Zealand" },
			{ "CC", "Oceania", "Australia and New Zealand" }, { "CO", "Americas", "Latin America and the Caribbean" },
			{ "KM", "Africa", "Sub-Saharan Africa" }, { "CG", "Africa", "Sub-Saharan Africa" },
			{ "CD", "Africa", "Sub-Saharan Africa" }, { "CK", "Oceania", "Polynesia" },
			{ "CR", "Americas", "Latin America and the Caribbean" }, { "CI", "Africa", "Sub-Saharan Africa" },
			{ "HR", "Europe", "Southern Europe" }, { "CU", "Americas", "Latin America and the Caribbean" },
			{ "CW", "Americas", "Latin America and the Caribbean" }, { "CY", "Asia", "Western Asia" },
			{ "CZ", "Europe", "Eastern Europe" }, { "DK", "Europe", "Northern Europe" },
			{ "DJ", "Africa", "Sub-Saharan Africa" }, { "DM", "Americas", "Latin America and the Caribbean" },
			{ "DO", "Americas", "Latin America and the Caribbean" },
			{ "EC", "Americas", "Latin America and the Caribbean" }, { "EG", "Africa", "Northern Africa" },
			{ "SV", "Americas", "Latin America and the Caribbean" }, { "GQ", "Africa", "Sub-Saharan Africa" },
			{ "ER", "Africa", "Sub-Saharan Africa" }, { "EE", "Europe", "Northern Europe" },
			{ "SZ", "Africa", "Sub-Saharan Africa" }, { "ET", "Africa", "Sub-Saharan Africa" },
			{ "FK", "Americas", "Latin America and the Caribbean" }, { "FO", "Europe", "Northern Europe" },
			{ "FJ", "Oceania", "Melanesia" }, { "FI", "Europe", "Northern Europe" },
			{ "FR", "Europe", "Western Europe" }, { "GF", "Americas", "Latin America and the Caribbean" },
			{ "PF", "Oceania", "Polynesia" }, { "TF", "Africa", "Sub-Saharan Africa" },
			{ "GA", "Africa", "Sub-Saharan Africa" }, { "GM", "Africa", "Sub-Saharan Africa" },
			{ "GE", "Asia", "Western Asia" }, { "DE", "Europe", "Western Europe" },
			{ "GH", "Africa", "Sub-Saharan Africa" }, { "GI", "Europe", "Southern Europe" },
			{ "GR", "Europe", "Southern Europe" }, { "GL", "Americas", "Northern America" },
			{ "GD", "Americas", "Latin America and the Caribbean" },
			{ "GP", "Americas", "Latin America and the Caribbean" }, { "GU", "Oceania", "Micronesia" },
			{ "GT", "Americas", "Latin America and the Caribbean" }, { "GG", "Europe", "Northern Europe" },
			{ "GN", "Africa", "Sub-Saharan Africa" }, { "GW", "Africa", "Sub-Saharan Africa" },
			{ "GY", "Americas", "Latin America and the Caribbean" },
			{ "HT", "Americas", "Latin America and the Caribbean" }, { "HM", "Oceania", "Australia and New Zealand" },
			{ "VA", "Europe", "Southern Europe" }, { "HN", "Americas", "Latin America and the Caribbean" },
			{ "HK", "Asia", "Eastern Asia" }, { "HU", "Europe", "Eastern Europe" },
			{ "IS", "Europe", "Northern Europe" }, { "IN", "Asia", "Southern Asia" },
			{ "ID", "Asia", "South-eastern Asia" }, { "IR", "Asia", "Southern Asia" }, { "IQ", "Asia", "Western Asia" },
			{ "IE", "Europe", "Northern Europe" }, { "IM", "Europe", "Northern Europe" },
			{ "IL", "Asia", "Western Asia" }, { "IT", "Europe", "Southern Europe" },
			{ "JM", "Americas", "Latin America and the Caribbean" }, { "JP", "Asia", "Eastern Asia" },
			{ "JE", "Europe", "Northern Europe" }, { "JO", "Asia", "Western Asia" }, { "KZ", "Asia", "Central Asia" },
			{ "KE", "Africa", "Sub-Saharan Africa" }, { "KI", "Oceania", "Micronesia" },
			{ "KP", "Asia", "Eastern Asia" }, { "KR", "Asia", "Eastern Asia" }, { "KW", "Asia", "Western Asia" },
			{ "KG", "Asia", "Central Asia" }, { "LA", "Asia", "South-eastern Asia" },
			{ "LV", "Europe", "Northern Europe" }, { "LB", "Asia", "Western Asia" },
			{ "LS", "Africa", "Sub-Saharan Africa" }, { "LR", "Africa", "Sub-Saharan Africa" },
			{ "LY", "Africa", "Northern Africa" }, { "LI", "Europe", "Western Europe" },
			{ "LT", "Europe", "Northern Europe" }, { "LU", "Europe", "Western Europe" },
			{ "MO", "Asia", "Eastern Asia" }, { "MG", "Africa", "Sub-Saharan Africa" },
			{ "MW", "Africa", "Sub-Saharan Africa" }, { "MY", "Asia", "South-eastern Asia" },
			{ "MV", "Asia", "Southern Asia" }, { "ML", "Africa", "Sub-Saharan Africa" },
			{ "MT", "Europe", "Southern Europe" }, { "MH", "Oceania", "Micronesia" },
			{ "MQ", "Americas", "Latin America and the Caribbean" }, { "MR", "Africa", "Sub-Saharan Africa" },
			{ "MU", "Africa", "Sub-Saharan Africa" }, { "YT", "Africa", "Sub-Saharan Africa" },
			{ "MX", "Americas", "Latin America and the Caribbean" }, { "FM", "Oceania", "Micronesia" },
			{ "MD", "Europe", "Eastern Europe" }, { "MC", "Europe", "Western Europe" },
			{ "MN", "Asia", "Eastern Asia" }, { "ME", "Europe", "Southern Europe" },
			{ "MS", "Americas", "Latin America and the Caribbean" }, { "MA", "Africa", "Northern Africa" },
			{ "MZ", "Africa", "Sub-Saharan Africa" }, { "MM", "Asia", "South-eastern Asia" },
			{ "NA", "Africa", "Sub-Saharan Africa" }, { "NR", "Oceania", "Micronesia" },
			{ "NP", "Asia", "Southern Asia" }, { "NL", "Europe", "Western Europe" }, { "NC", "Oceania", "Melanesia" },
			{ "NZ", "Oceania", "Australia and New Zealand" }, { "NI", "Americas", "Latin America and the Caribbean" },
			{ "NE", "Africa", "Sub-Saharan Africa" }, { "NG", "Africa", "Sub-Saharan Africa" },
			{ "NU", "Oceania", "Polynesia" }, { "NF", "Oceania", "Australia and New Zealand" },
			{ "MK", "Europe", "Southern Europe" }, { "MP", "Oceania", "Micronesia" },
			{ "NO", "Europe", "Northern Europe" }, { "OM", "Asia", "Western Asia" }, { "PK", "Asia", "Southern Asia" },
			{ "PW", "Oceania", "Micronesia" }, { "PS", "Asia", "Western Asia" },
			{ "PA", "Americas", "Latin America and the Caribbean" }, { "PG", "Oceania", "Melanesia" },
			{ "PY", "Americas", "Latin America and the Caribbean" },
			{ "PE", "Americas", "Latin America and the Caribbean" }, { "PH", "Asia", "South-eastern Asia" },
			{ "PN", "Oceania", "Polynesia" }, { "PL", "Europe", "Eastern Europe" },
			{ "PT", "Europe", "Southern Europe" }, { "PR", "Americas", "Latin America and the Caribbean" },
			{ "QA", "Asia", "Western Asia" }, { "RE", "Africa", "Sub-Saharan Africa" },
			{ "RO", "Europe", "Eastern Europe" }, { "RU", "Europe", "Eastern Europe" },
			{ "RW", "Africa", "Sub-Saharan Africa" }, { "BL", "Americas", "Latin America and the Caribbean" },
			{ "SH", "Africa", "Sub-Saharan Africa" }, { "KN", "Americas", "Latin America and the Caribbean" },
			{ "LC", "Americas", "Latin America and the Caribbean" },
			{ "MF", "Americas", "Latin America and the Caribbean" }, { "PM", "Americas", "Northern America" },
			{ "VC", "Americas", "Latin America and the Caribbean" }, { "WS", "Oceania", "Polynesia" },
			{ "SM", "Europe", "Southern Europe" }, { "ST", "Africa", "Sub-Saharan Africa" },
			{ "SA", "Asia", "Western Asia" }, { "SN", "Africa", "Sub-Saharan Africa" },
			{ "RS", "Europe", "Southern Europe" }, { "SC", "Africa", "Sub-Saharan Africa" },
			{ "SL", "Africa", "Sub-Saharan Africa" }, { "SG", "Asia", "South-eastern Asia" },
			{ "SX", "Americas", "Latin America and the Caribbean" }, { "SK", "Europe", "Eastern Europe" },
			{ "SI", "Europe", "Southern Europe" }, { "SB", "Oceania", "Melanesia" },
			{ "SO", "Africa", "Sub-Saharan Africa" }, { "ZA", "Africa", "Sub-Saharan Africa" },
			{ "GS", "Americas", "Latin America and the Caribbean" }, { "SS", "Africa", "Sub-Saharan Africa" },
			{ "ES", "Europe", "Southern Europe" }, { "LK", "Asia", "Southern Asia" },
			{ "SD", "Africa", "Northern Africa" }, { "SR", "Americas", "Latin America and the Caribbean" },
			{ "SJ", "Europe", "Northern Europe" }, { "SE", "Europe", "Northern Europe" },
			{ "CH", "Europe", "Western Europe" }, { "SY", "Asia", "Western Asia" }, { "TW", "Asia", "Eastern Asia" },
			{ "TJ", "Asia", "Central Asia" }, { "TZ", "Africa", "Sub-Saharan Africa" },
			{ "TH", "Asia", "South-eastern Asia" }, { "TL", "Asia", "South-eastern Asia" },
			{ "TG", "Africa", "Sub-Saharan Africa" }, { "TK", "Oceania", "Polynesia" },
			{ "TO", "Oceania", "Polynesia" }, { "TT", "Americas", "Latin America and the Caribbean" },
			{ "TN", "Africa", "Northern Africa" }, { "TR", "Asia", "Western Asia" }, { "TM", "Asia", "Central Asia" },
			{ "TC", "Americas", "Latin America and the Caribbean" }, { "TV", "Oceania", "Polynesia" },
			{ "UG", "Africa", "Sub-Saharan Africa" }, { "UA", "Europe", "Eastern Europe" },
			{ "AE", "Asia", "Western Asia" }, { "GB", "Europe", "Northern Europe" },
			{ "US", "Americas", "Northern America" }, { "UM", "Oceania", "Micronesia" },
			{ "UY", "Americas", "Latin America and the Caribbean" }, { "UZ", "Asia", "Central Asia" },
			{ "VU", "Oceania", "Melanesia" }, { "VE", "Americas", "Latin America and the Caribbean" },
			{ "VN", "Asia", "South-eastern Asia" }, { "VG", "Americas", "Latin America and the Caribbean" },
			{ "VI", "Americas", "Latin America and the Caribbean" }, { "WF", "Oceania", "Polynesia" },
			{ "EH", "Africa", "Northern Africa" }, { "YE", "Asia", "Western Asia" },
			{ "ZM", "Africa", "Sub-Saharan Africa" }, { "ZW", "Africa", "Sub-Saharan Africa" }, };

	public static void main(String[] args) throws IOException {
		for (String co : Locale.getISOCountries()) {
			Locale locale = new Locale("", co);
			String iso = locale.getISO3Country();
			String code = locale.getCountry();
			String name1 = locale.getDisplayCountry(Locale.ENGLISH);
			String name2 = locale.getDisplayCountry(Locale.GERMAN);
			boolean good = false;
			for (String[] string : sa) {
				if (string[0].equals(co)) {
					System.out.println(iso + " , " + code + " , " + name1 + " , " + name2 + " , " + string[1] + " , " + string[2]);
					good = true;
					break;
				}
			}
			if (!good) {
				System.out.println(co);
				break;
			}
		}
	}
}

Code:
AND , AD , Andorra , Andorra , Europe , Southern Europe
ARE , AE , United Arab Emirates , Vereinigte Arabische Emirate , Asia , Western Asia
AFG , AF , Afghanistan , Afghanistan , Asia , Southern Asia
ATG , AG , Antigua & Barbuda , Antigua und Barbuda , Americas , Latin America and the Caribbean
AIA , AI , Anguilla , Anguilla , Americas , Latin America and the Caribbean
ALB , AL , Albania , Albanien , Europe , Southern Europe
ARM , AM , Armenia , Armenien , Asia , Western Asia
AGO , AO , Angola , Angola , Africa , Sub-Saharan Africa
ATA , AQ , Antarctica , Antarktis ,  , 
ARG , AR , Argentina , Argentinien , Americas , Latin America and the Caribbean
ASM , AS , American Samoa , Amerikanisch-Samoa , Oceania , Polynesia
AUT , AT , Austria , Österreich , Europe , Western Europe
AUS , AU , Australia , Australien , Oceania , Australia and New Zealand
ABW , AW , Aruba , Aruba , Americas , Latin America and the Caribbean
ALA , AX , Åland Islands , Ålandinseln , Europe , Northern Europe
AZE , AZ , Azerbaijan , Aserbaidschan , Asia , Western Asia
BIH , BA , Bosnia & Herzegovina , Bosnien und Herzegowina , Europe , Southern Europe
BRB , BB , Barbados , Barbados , Americas , Latin America and the Caribbean
BGD , BD , Bangladesh , Bangladesch , Asia , Southern Asia
BEL , BE , Belgium , Belgien , Europe , Western Europe
BFA , BF , Burkina Faso , Burkina Faso , Africa , Sub-Saharan Africa
BGR , BG , Bulgaria , Bulgarien , Europe , Eastern Europe
BHR , BH , Bahrain , Bahrain , Asia , Western Asia
BDI , BI , Burundi , Burundi , Africa , Sub-Saharan Africa
BEN , BJ , Benin , Benin , Africa , Sub-Saharan Africa
BLM , BL , St. Barthélemy , St. Barthélemy , Americas , Latin America and the Caribbean
BMU , BM , Bermuda , Bermuda , Americas , Northern America
BRN , BN , Brunei , Brunei Darussalam , Asia , South-eastern Asia
BOL , BO , Bolivia , Bolivien , Americas , Latin America and the Caribbean
BES , BQ , Caribbean Netherlands , Bonaire, Sint Eustatius und Saba , Americas , Latin America and the Caribbean
BRA , BR , Brazil , Brasilien , Americas , Latin America and the Caribbean
BHS , BS , Bahamas , Bahamas , Americas , Latin America and the Caribbean
BTN , BT , Bhutan , Bhutan , Asia , Southern Asia
BVT , BV , Bouvet Island , Bouvetinsel , Americas , Latin America and the Caribbean
BWA , BW , Botswana , Botsuana , Africa , Sub-Saharan Africa
BLR , BY , Belarus , Belarus , Europe , Eastern Europe
BLZ , BZ , Belize , Belize , Americas , Latin America and the Caribbean
CAN , CA , Canada , Kanada , Americas , Northern America
CCK , CC , Cocos (Keeling) Islands , Kokosinseln , Oceania , Australia and New Zealand
COD , CD , Congo - Kinshasa , Kongo-Kinshasa , Africa , Sub-Saharan Africa
CAF , CF , Central African Republic , Zentralafrikanische Republik , Africa , Sub-Saharan Africa
COG , CG , Congo - Brazzaville , Kongo-Brazzaville , Africa , Sub-Saharan Africa
CHE , CH , Switzerland , Schweiz , Europe , Western Europe
CIV , CI , Côte d’Ivoire , Côte d’Ivoire , Africa , Sub-Saharan Africa
COK , CK , Cook Islands , Cookinseln , Oceania , Polynesia
CHL , CL , Chile , Chile , Americas , Latin America and the Caribbean
CMR , CM , Cameroon , Kamerun , Africa , Sub-Saharan Africa
CHN , CN , China , China , Asia , Eastern Asia
COL , CO , Colombia , Kolumbien , Americas , Latin America and the Caribbean
CRI , CR , Costa Rica , Costa Rica , Americas , Latin America and the Caribbean
CUB , CU , Cuba , Kuba , Americas , Latin America and the Caribbean
CPV , CV , Cape Verde , Cabo Verde , Africa , Sub-Saharan Africa
CUW , CW , Curaçao , Curaçao , Americas , Latin America and the Caribbean
CXR , CX , Christmas Island , Weihnachtsinsel , Oceania , Australia and New Zealand
CYP , CY , Cyprus , Zypern , Asia , Western Asia
CZE , CZ , Czechia , Tschechien , Europe , Eastern Europe
DEU , DE , Germany , Deutschland , Europe , Western Europe
DJI , DJ , Djibouti , Dschibuti , Africa , Sub-Saharan Africa
DNK , DK , Denmark , Dänemark , Europe , Northern Europe
DMA , DM , Dominica , Dominica , Americas , Latin America and the Caribbean
DOM , DO , Dominican Republic , Dominikanische Republik , Americas , Latin America and the Caribbean
DZA , DZ , Algeria , Algerien , Africa , Northern Africa
ECU , EC , Ecuador , Ecuador , Americas , Latin America and the Caribbean
EST , EE , Estonia , Estland , Europe , Northern Europe
EGY , EG , Egypt , Ägypten , Africa , Northern Africa
ESH , EH , Western Sahara , Westsahara , Africa , Northern Africa
ERI , ER , Eritrea , Eritrea , Africa , Sub-Saharan Africa
ESP , ES , Spain , Spanien , Europe , Southern Europe
ETH , ET , Ethiopia , Äthiopien , Africa , Sub-Saharan Africa
FIN , FI , Finland , Finnland , Europe , Northern Europe
FJI , FJ , Fiji , Fidschi , Oceania , Melanesia
FLK , FK , Falkland Islands , Falklandinseln , Americas , Latin America and the Caribbean
FSM , FM , Micronesia , Mikronesien , Oceania , Micronesia
FRO , FO , Faroe Islands , Färöer , Europe , Northern Europe
FRA , FR , France , Frankreich , Europe , Western Europe
GAB , GA , Gabon , Gabun , Africa , Sub-Saharan Africa
GBR , GB , United Kingdom , Vereinigtes Königreich , Europe , Northern Europe
GRD , GD , Grenada , Grenada , Americas , Latin America and the Caribbean
GEO , GE , Georgia , Georgien , Asia , Western Asia
GUF , GF , French Guiana , Französisch-Guayana , Americas , Latin America and the Caribbean
GGY , GG , Guernsey , Guernsey , Europe , Northern Europe
GHA , GH , Ghana , Ghana , Africa , Sub-Saharan Africa
GIB , GI , Gibraltar , Gibraltar , Europe , Southern Europe
GRL , GL , Greenland , Grönland , Americas , Northern America
GMB , GM , Gambia , Gambia , Africa , Sub-Saharan Africa
GIN , GN , Guinea , Guinea , Africa , Sub-Saharan Africa
GLP , GP , Guadeloupe , Guadeloupe , Americas , Latin America and the Caribbean
GNQ , GQ , Equatorial Guinea , Äquatorialguinea , Africa , Sub-Saharan Africa
GRC , GR , Greece , Griechenland , Europe , Southern Europe
SGS , GS , South Georgia & South Sandwich Islands , Südgeorgien und die Südlichen Sandwichinseln , Americas , Latin America and the Caribbean
GTM , GT , Guatemala , Guatemala , Americas , Latin America and the Caribbean
GUM , GU , Guam , Guam , Oceania , Micronesia
GNB , GW , Guinea-Bissau , Guinea-Bissau , Africa , Sub-Saharan Africa
GUY , GY , Guyana , Guyana , Americas , Latin America and the Caribbean
HKG , HK , Hong Kong SAR China , Sonderverwaltungsregion Hongkong , Asia , Eastern Asia
HMD , HM , Heard & McDonald Islands , Heard und McDonaldinseln , Oceania , Australia and New Zealand
HND , HN , Honduras , Honduras , Americas , Latin America and the Caribbean
HRV , HR , Croatia , Kroatien , Europe , Southern Europe
HTI , HT , Haiti , Haiti , Americas , Latin America and the Caribbean
HUN , HU , Hungary , Ungarn , Europe , Eastern Europe
IDN , ID , Indonesia , Indonesien , Asia , South-eastern Asia
IRL , IE , Ireland , Irland , Europe , Northern Europe
ISR , IL , Israel , Israel , Asia , Western Asia
IMN , IM , Isle of Man , Isle of Man , Europe , Northern Europe
IND , IN , India , Indien , Asia , Southern Asia
IOT , IO , British Indian Ocean Territory , Britisches Territorium im Indischen Ozean , Africa , Sub-Saharan Africa
IRQ , IQ , Iraq , Irak , Asia , Western Asia
IRN , IR , Iran , Iran , Asia , Southern Asia
ISL , IS , Iceland , Island , Europe , Northern Europe
ITA , IT , Italy , Italien , Europe , Southern Europe
JEY , JE , Jersey , Jersey , Europe , Northern Europe
JAM , JM , Jamaica , Jamaika , Americas , Latin America and the Caribbean
JOR , JO , Jordan , Jordanien , Asia , Western Asia
JPN , JP , Japan , Japan , Asia , Eastern Asia
KEN , KE , Kenya , Kenia , Africa , Sub-Saharan Africa
KGZ , KG , Kyrgyzstan , Kirgisistan , Asia , Central Asia
KHM , KH , Cambodia , Kambodscha , Asia , South-eastern Asia
KIR , KI , Kiribati , Kiribati , Oceania , Micronesia
COM , KM , Comoros , Komoren , Africa , Sub-Saharan Africa
KNA , KN , St. Kitts & Nevis , St. Kitts und Nevis , Americas , Latin America and the Caribbean
PRK , KP , North Korea , Nordkorea , Asia , Eastern Asia
KOR , KR , South Korea , Südkorea , Asia , Eastern Asia
KWT , KW , Kuwait , Kuwait , Asia , Western Asia
CYM , KY , Cayman Islands , Kaimaninseln , Americas , Latin America and the Caribbean
KAZ , KZ , Kazakhstan , Kasachstan , Asia , Central Asia
LAO , LA , Laos , Laos , Asia , South-eastern Asia
LBN , LB , Lebanon , Libanon , Asia , Western Asia
LCA , LC , St. Lucia , St. Lucia , Americas , Latin America and the Caribbean
LIE , LI , Liechtenstein , Liechtenstein , Europe , Western Europe
LKA , LK , Sri Lanka , Sri Lanka , Asia , Southern Asia
LBR , LR , Liberia , Liberia , Africa , Sub-Saharan Africa
LSO , LS , Lesotho , Lesotho , Africa , Sub-Saharan Africa
LTU , LT , Lithuania , Litauen , Europe , Northern Europe
LUX , LU , Luxembourg , Luxemburg , Europe , Western Europe
LVA , LV , Latvia , Lettland , Europe , Northern Europe
LBY , LY , Libya , Libyen , Africa , Northern Africa
MAR , MA , Morocco , Marokko , Africa , Northern Africa
MCO , MC , Monaco , Monaco , Europe , Western Europe
MDA , MD , Moldova , Republik Moldau , Europe , Eastern Europe
MNE , ME , Montenegro , Montenegro , Europe , Southern Europe
MAF , MF , St. Martin , St. Martin , Americas , Latin America and the Caribbean
MDG , MG , Madagascar , Madagaskar , Africa , Sub-Saharan Africa
MHL , MH , Marshall Islands , Marshallinseln , Oceania , Micronesia
MKD , MK , Macedonia , Mazedonien , Europe , Southern Europe
MLI , ML , Mali , Mali , Africa , Sub-Saharan Africa
MMR , MM , Myanmar (Burma) , Myanmar , Asia , South-eastern Asia
MNG , MN , Mongolia , Mongolei , Asia , Eastern Asia
MAC , MO , Macau SAR China , Sonderverwaltungsregion Macau , Asia , Eastern Asia
MNP , MP , Northern Mariana Islands , Nördliche Marianen , Oceania , Micronesia
MTQ , MQ , Martinique , Martinique , Americas , Latin America and the Caribbean
MRT , MR , Mauritania , Mauretanien , Africa , Sub-Saharan Africa
MSR , MS , Montserrat , Montserrat , Americas , Latin America and the Caribbean
MLT , MT , Malta , Malta , Europe , Southern Europe
MUS , MU , Mauritius , Mauritius , Africa , Sub-Saharan Africa
MDV , MV , Maldives , Malediven , Asia , Southern Asia
MWI , MW , Malawi , Malawi , Africa , Sub-Saharan Africa
MEX , MX , Mexico , Mexiko , Americas , Latin America and the Caribbean
MYS , MY , Malaysia , Malaysia , Asia , South-eastern Asia
MOZ , MZ , Mozambique , Mosambik , Africa , Sub-Saharan Africa
NAM , NA , Namibia , Namibia , Africa , Sub-Saharan Africa
NCL , NC , New Caledonia , Neukaledonien , Oceania , Melanesia
NER , NE , Niger , Niger , Africa , Sub-Saharan Africa
NFK , NF , Norfolk Island , Norfolkinsel , Oceania , Australia and New Zealand
NGA , NG , Nigeria , Nigeria , Africa , Sub-Saharan Africa
NIC , NI , Nicaragua , Nicaragua , Americas , Latin America and the Caribbean
NLD , NL , Netherlands , Niederlande , Europe , Western Europe
NOR , NO , Norway , Norwegen , Europe , Northern Europe
NPL , NP , Nepal , Nepal , Asia , Southern Asia
NRU , NR , Nauru , Nauru , Oceania , Micronesia
NIU , NU , Niue , Niue , Oceania , Polynesia
NZL , NZ , New Zealand , Neuseeland , Oceania , Australia and New Zealand
OMN , OM , Oman , Oman , Asia , Western Asia
PAN , PA , Panama , Panama , Americas , Latin America and the Caribbean
PER , PE , Peru , Peru , Americas , Latin America and the Caribbean
PYF , PF , French Polynesia , Französisch-Polynesien , Oceania , Polynesia
PNG , PG , Papua New Guinea , Papua-Neuguinea , Oceania , Melanesia
PHL , PH , Philippines , Philippinen , Asia , South-eastern Asia
PAK , PK , Pakistan , Pakistan , Asia , Southern Asia
POL , PL , Poland , Polen , Europe , Eastern Europe
SPM , PM , St. Pierre & Miquelon , St. Pierre und Miquelon , Americas , Northern America
PCN , PN , Pitcairn Islands , Pitcairninseln , Oceania , Polynesia
PRI , PR , Puerto Rico , Puerto Rico , Americas , Latin America and the Caribbean
PSE , PS , Palestinian Territories , Palästinensische Autonomiegebiete , Asia , Western Asia
PRT , PT , Portugal , Portugal , Europe , Southern Europe
PLW , PW , Palau , Palau , Oceania , Micronesia
PRY , PY , Paraguay , Paraguay , Americas , Latin America and the Caribbean
QAT , QA , Qatar , Katar , Asia , Western Asia
REU , RE , Réunion , Réunion , Africa , Sub-Saharan Africa
ROU , RO , Romania , Rumänien , Europe , Eastern Europe
SRB , RS , Serbia , Serbien , Europe , Southern Europe
RUS , RU , Russia , Russland , Europe , Eastern Europe
RWA , RW , Rwanda , Ruanda , Africa , Sub-Saharan Africa
SAU , SA , Saudi Arabia , Saudi-Arabien , Asia , Western Asia
SLB , SB , Solomon Islands , Salomonen , Oceania , Melanesia
SYC , SC , Seychelles , Seychellen , Africa , Sub-Saharan Africa
SDN , SD , Sudan , Sudan , Africa , Northern Africa
SWE , SE , Sweden , Schweden , Europe , Northern Europe
SGP , SG , Singapore , Singapur , Asia , South-eastern Asia
SHN , SH , St. Helena , St. Helena , Africa , Sub-Saharan Africa
SVN , SI , Slovenia , Slowenien , Europe , Southern Europe
SJM , SJ , Svalbard & Jan Mayen , Spitzbergen und Jan Mayen , Europe , Northern Europe
SVK , SK , Slovakia , Slowakei , Europe , Eastern Europe
SLE , SL , Sierra Leone , Sierra Leone , Africa , Sub-Saharan Africa
SMR , SM , San Marino , San Marino , Europe , Southern Europe
SEN , SN , Senegal , Senegal , Africa , Sub-Saharan Africa
SOM , SO , Somalia , Somalia , Africa , Sub-Saharan Africa
SUR , SR , Suriname , Suriname , Americas , Latin America and the Caribbean
SSD , SS , South Sudan , Südsudan , Africa , Sub-Saharan Africa
STP , ST , São Tomé & Príncipe , São Tomé und Príncipe , Africa , Sub-Saharan Africa
SLV , SV , El Salvador , El Salvador , Americas , Latin America and the Caribbean
SXM , SX , Sint Maarten , Sint Maarten , Americas , Latin America and the Caribbean
SYR , SY , Syria , Syrien , Asia , Western Asia
SWZ , SZ , Swaziland , Swasiland , Africa , Sub-Saharan Africa
TCA , TC , Turks & Caicos Islands , Turks- und Caicosinseln , Americas , Latin America and the Caribbean
TCD , TD , Chad , Tschad , Africa , Sub-Saharan Africa
ATF , TF , French Southern Territories , Französische Süd- und Antarktisgebiete , Africa , Sub-Saharan Africa
TGO , TG , Togo , Togo , Africa , Sub-Saharan Africa
THA , TH , Thailand , Thailand , Asia , South-eastern Asia
TJK , TJ , Tajikistan , Tadschikistan , Asia , Central Asia
TKL , TK , Tokelau , Tokelau , Oceania , Polynesia
TLS , TL , Timor-Leste , Timor-Leste , Asia , South-eastern Asia
TKM , TM , Turkmenistan , Turkmenistan , Asia , Central Asia
TUN , TN , Tunisia , Tunesien , Africa , Northern Africa
TON , TO , Tonga , Tonga , Oceania , Polynesia
TUR , TR , Turkey , Türkei , Asia , Western Asia
TTO , TT , Trinidad & Tobago , Trinidad und Tobago , Americas , Latin America and the Caribbean
TUV , TV , Tuvalu , Tuvalu , Oceania , Polynesia
TWN , TW , Taiwan , Taiwan , Asia , Eastern Asia
TZA , TZ , Tanzania , Tansania , Africa , Sub-Saharan Africa
UKR , UA , Ukraine , Ukraine , Europe , Eastern Europe
UGA , UG , Uganda , Uganda , Africa , Sub-Saharan Africa
UMI , UM , U.S. Outlying Islands , Amerikanische Überseeinseln , Oceania , Micronesia
USA , US , United States , Vereinigte Staaten , Americas , Northern America
URY , UY , Uruguay , Uruguay , Americas , Latin America and the Caribbean
UZB , UZ , Uzbekistan , Usbekistan , Asia , Central Asia
VAT , VA , Vatican City , Vatikanstadt , Europe , Southern Europe
VCT , VC , St. Vincent & Grenadines , St. Vincent und die Grenadinen , Americas , Latin America and the Caribbean
VEN , VE , Venezuela , Venezuela , Americas , Latin America and the Caribbean
VGB , VG , British Virgin Islands , Britische Jungferninseln , Americas , Latin America and the Caribbean
VIR , VI , U.S. Virgin Islands , Amerikanische Jungferninseln , Americas , Latin America and the Caribbean
VNM , VN , Vietnam , Vietnam , Asia , South-eastern Asia
VUT , VU , Vanuatu , Vanuatu , Oceania , Melanesia
WLF , WF , Wallis & Futuna , Wallis und Futuna , Oceania , Polynesia
WSM , WS , Samoa , Samoa , Oceania , Polynesia
YEM , YE , Yemen , Jemen , Asia , Western Asia
MYT , YT , Mayotte , Mayotte , Africa , Sub-Saharan Africa
ZAF , ZA , South Africa , Südafrika , Africa , Sub-Saharan Africa
ZMB , ZM , Zambia , Sambia , Africa , Sub-Saharan Africa
ZWE , ZW , Zimbabwe , Simbabwe , Africa , Sub-Saharan Africa


Kein Wort zu niemanden wer Dir diese Information gab. :D Nein Quatsch... das sind die ISO 3166 Länder.
 
K

kneitzel

Also so Daten fest in Code zu schreiben halte ich für schlecht. Daten gehören in eine Datenbank bzw. in ein Datenfile, welches dann eingelesen wird.

Und ein zweidimensionales Array ist auch suboptimal. Der TE will ja über einen Countrycode zugreifen, so dass ich da dann eher eine Map als geeignet ansehen würde. (Und generell würde ich die Daten Kapseln und nicht die Daten direkt in welcher Datenstruktur auch immer nach außen geben.)
 
Bei den Daten sollte man auch beachten, dass dort ein Land immer nur in einem Kontinent liegt. Es gibt jedoch fünf Länder auf der Erde, die in zwei und sogar drei Kontinenten gleichzeitig liegen.
Türkei: Asien und Europa (in den Daten: Asien)
Russland: Asien und Europa (in den Daten: Europa)
Kasachstan: Asien und Europa (in den Daten: Asien)
Aserbaidschan: Asien und Europa (in den Daten: Asien)
Ägypten: Asien, Europa und Afrika (in den Daten: Afrika)
Man könnte jetzt meinen, dass die Zugehörigkeit gemäß des größten Flächenanteils festgelegt wird. Das ist jedoch bei Russland (in den Daten: Europa) offensichtlich nicht der Fall, mit 77% der Fläche in Asien.
 
K

kneitzel

Es ist mir egal, was Du für schlecht hältst oder wohin was für Dich gehört.

Hattest Du nicht einen Schwächeanfall? Dann leg Dich besser wieder hin anstatt andere mit Deinen Weisheiten belehren zu wollen.

Oder Anders: Wenn man keine Ahnung hat...
Genau so sehe ich das auch: mir ist es scheiss egal, was Du von meinen Beiträgen hälst. Aber wenn Du etwas postest, das schlicht schlecht ist, dann mache ich darauf aufmerksam.

Du schreibst erst einen Prototyp für so ein minimales Ding? In der Zeit, in der Du das gemacht hast, hättest Du es auch schon richtig machen können.

Nur weil Du es mal wieder mal nicht merkst: Du bist Derjenige, der auf sachliche Kritik mit unsachlichen pers. Angriffen reagiert.

Edit: Aussagen zu @Tobias-nrw entfernt.
 
Zuletzt bearbeitet von einem Moderator:
hier erkennt niemand von den Trollen, was ein Prototyp ist... :D
Erst hatte ich mir ja nichts Übles dabei gedacht, aber wenn du es als Prototyp gemeint hast, finde ich das schon ziemlich schlimm.;)
Aus Wikipedia:
wikipedia hat gesagt.:
Prototyp (aus dem Griechischen von protos und typos für „erstes Vorbild“) steht für: eine Sache oder ein Konzept, welches als Vorlage (Muster) für weitere, ähnliche Dinge dient ...
 
@Meniskusschaden Ach das deutsche Wikipedia hat doch k A von Programmierung und schreibt einfach viel Bla bla, das das Wort den Sinnzusammenhang entnimmt...

@beta20 hätte sich einfach freuen können, dass die Recherche jemand für ihn übernahm... :p
 
Passende Stellenanzeigen aus deiner Region:

Neue Themen

Oben