NAME

iso2country - Hash to convert ISO 3166-1 2-char country code to country name


SYNOPSIS

    require 'iso2country.pl';
    $country_name = $iso2country{"jp"};
    # $country_name is "Japan"
    $country_name = $iso2country{"uk"};
    # $country_name is "United Kingdom"
    # Exceptional Case. Country Code for UK is "gb" in ISO 3166-1.


Difference between ISO 3166 and this script

For detail about ISO 3166 Newsletter, see http://www.iso.org/iso/en/prods-services/iso3166ma/03updates-on-iso-3166/index.html

United Kingdom
In ISO 3166, United Kingdom is assigned ``gb'', but in Internet Domain System UK uses ``uk''. This script accept both.

Timor-Leste and East Timor
According to ISO 3166-1 Newsletter V-5, country code for East Timor is changed ``tp'' to ``tl'', because of country name was changed. But in Internet Domain System, ``tp'' is still used. This script accept both.

According to ISO 3166-1 Newsletter V-6, ``East Timor'' changed thier country name to ``Timor-Leste''. This script returns ``Timor-Leste (former East Timor)'' for ``tp'' and ``tl''.

Serbia and Montenegro (Former Yugoslavia)
According to ISO 3166-1 Newsletter V-8, ``yu'' for Yugoslavia is deleted and ``cs'' for Serbia and Montenegro is assigned. In Internet Domain System, ``yu'' is still used. So this script accept both and returns ``Serbia and Montenegro (Former Yugoslavia)'' for ``cs'' and ``yu''.


AUTHOR

Yuuichirou Oka <oka@a-f.jp>

Latest version is distributed at http://a-f.jp/oka/domains/iso2country/


COPYRIGHT

Copyright (c) 2003-2004 Yuuichirou Oka. All rights reserved.

This script is freeware. You can use, modify and/or redistribute this script under the terms of GNU General Public License(GPL). For detail about GNU GPL, see http://www.gnu.org/licenses/licenses.html .