[Pkg-isocodes-devel] geoip and iso_3166

LI Daobing lidaobing at gmail.com
Sun Aug 19 21:21:39 UTC 2007


Hello,

geoip is a library to convert IP to country name and others, I compare
the country list from geoip and iso_3166.

I only mention these names which in geoip but not in iso_3166

geip          # iso-3166 corresspoding one
--------------------------------------------
East Timor    # iso_3166_3
France, Metropolitan # iso_3166_3
Serbia and Montenegro # disappeared
Cote D'Ivoire # Côte d'Ivoire
Macau         # Macao
Macedonia     # Macedonia, Republic of
Palestinian Territory # Palestinian Territory, Occupied
Pitcairn Islands # Pitcairn
Vietnam       # Viet Nam
Zaire         # Zaire, Republic of


and followings should not(?) contain in iso_3166
-----------------------------
Anonymous Proxy
Asia/Pacific Region
Europe
N/A
Other
Satellite Provider

1. East Timor and Frace, Metropolitan
these two in iso_3166_3 list, but iso_3166_3's names not in pot, it
should be a bug. following patch should be applied to
iso_3166/Makefile.am, and also need update Makefile.in, .pot and .po
files. I have a question on why iso_3166 use name but iso_3166_3 use
names?

$ svn diff iso_3166/Makefile.am
Index: iso_3166/Makefile.am
===================================================================
--- iso_3166/Makefile.am        (revision 966)
+++ iso_3166/Makefile.am        (working copy)
@@ -19,7 +19,7 @@

 iso_3166.pot: iso_3166.xml
        ../iso2pot.py --is-version $(VERSION) --comments alpha_3_code \
-               --fields name,official_name,common_name --outfile $@ $<
+               --fields name,names,official_name,common_name --outfile $@ $<

 EXTRA_DIST = \
        $(pofiles)      \

2. Serbia and Montenegro

we need update following information
ISO 3166-3 NEWSLETTER No. I-5
Date: 2006-12-01
http://www.iso.org/iso/en/prods-services/iso3166ma/03updates-on-iso-3166/nlp3i-5.html

3. others in the first list
a. a short-term one
add these one to the `common_name' attr, as the Taiwan did. but if
more than one alias, this will not work.

b. add a sub-element called `alias_entry' to iso_3166_entry and
iso_3166_3_entry. patch as following:

$ svn diff iso_3166.xml
Index: iso_3166.xml
===================================================================
--- iso_3166.xml        (revision 966)
+++ iso_3166.xml        (working copy)
@@ -9,7 +9,7 @@

 <!DOCTYPE iso_3166_entries [
        <!ELEMENT iso_3166_entries (iso_3166_entry+, iso_3166_3_entry*)>
-       <!ELEMENT iso_3166_entry EMPTY>
+       <!ELEMENT iso_3166_entry (alias_entry*)>
        <!ATTLIST iso_3166_entry
                alpha_2_code            CDATA   #REQUIRED
                alpha_3_code            CDATA   #REQUIRED
@@ -18,7 +18,7 @@
                name                    CDATA   #REQUIRED
                official_name           CDATA   #IMPLIED
        >
-       <!ELEMENT iso_3166_3_entry EMPTY>
+       <!ELEMENT iso_3166_3_entry (alias_entry*)>
        <!ATTLIST iso_3166_3_entry
                alpha_4_code            CDATA   #REQUIRED
                alpha_3_code            CDATA   #REQUIRED
@@ -27,6 +27,10 @@
                names                   CDATA   #REQUIRED
                comment                 CDATA   #IMPLIED
        >
+       <!ELEMENT alias_entry EMPTY>
+       <!ATTLIST alias_entry
+               name                    CDATA   #REQUIRED
+       >
 ]>

I will push 1 and 2 to svn, and what's your opinion on 3?

Thanks.

-- 
LI Daobing



More information about the Pkg-isocodes-devel mailing list