Help - Search - Member List - Calendar
Full Version: ip-to-country.csv too large
eMule Plus Forums > Development > Development
TheDoctor
When I updated to the newest ip-to-country.csv from
http://ip-to-country.webhosting.info/
the country names no longer show up in the Country column on the Servers tab.
I changed back to an older smaller one and it works fine. I tried to load it into Excel but it maxs out at 65,536 lines. Possibly the number of rows is also the problem in emule 1.2?
Fuxie - DK
Apparently, there is a bug in the file..
QUOTE(IP-to-Country.csv @ CVS)
Database updated on September 22, 2006 (appwith correction in line 55323).

I don't know the exact fix made, but the version from CVS works.

If you can't see the bug in that line yourself, maybe you could just remove the line..

EDIT: The file is normal text, so any text-editor (even Notepad) is suffient to edit the file..
AraldoL
Just compared the two files: The only difference is this line 55323:

eMulePlus CVS: "3557365440","3557365503","JE","JEY","JERSEY"
Website: "3557365440","3557365503","JE","",""

It's the only line where the last two fields are empty, obviously that's a problem when loading the list (a workaround would be to use the two letter abbreviation when the long name is missing).

Of course it would be better if the website would fix their list ...

Araldo
AraldoL
I just saw there is an updated database on the website. The above bug is still present and there is a new problem:

There is a new country "RS" with 34 entries. According to ISO newsletter http://www.iso.org/iso/en/prods-services/i.../nlv12-div.html this is the new code for "Serbia" formerly combined with "Montenegro" as "CS". There are still "CS" entries in the file, it's possible that "Montenegro" will be added later as "ME" too (not present now). Additionally, all of the new lines are incomplete and show the last two fields empty (i.e. "RS","","") just like the wrong "JE" entry. OK, the new country must be added to the program but for the empty fields: Why not use the 2 letter abbreviation for empty fields when reading the file? This way the unmodded file from the website can be used (as long as no new country is added, of course).

Araldo
Fuxie - DK
Rest assured that before next release, the new country codes will be added to CVS..

Also, a corrected version of IP-to-Country.csv file will be in the release archive..
AraldoL
Yes, I'm sure of that. In the meantime as a workaround I took the new database, changed the "JERSEY" line as described before and replaced all 34 occurrences of the new "RS","","" with the old "CS","SCB","SERBIA" and it works with the current program version.

In the last weeks I often saw clients with unknown country, I hope most of them are covered now with the new database.

Araldo
muleteer
QUOTE(AraldoL @ Oct 1 2006, 14:41)
Just compared the two files: The only difference is this line 55323:

eMulePlus CVS: "3557365440","3557365503","JE","JEY","JERSEY"
Website: "3557365440","3557365503","JE","",""

It's the only line where the last two fields are empty, obviously that's a problem when loading the list (a workaround would be to use the two letter abbreviation when the long name is missing).

Of course it would be better if the website would fix their list ...

Araldo
*

We need to improve error handling so that the functionality is not broken by lines that are not in the expected format. Seems that current code does not deal well with empty strings. sad.gif
AraldoL
Database is updated again:

1. Like before countries "JE" and "RS" still with empty fields ("JE" is two entries now)
2. New countries "ME" and "AX", these with empty fields too (should read "ME","MNE","MONTENEGRO" and "AX","ALA","ALAND ISLANDS").

Found an Aland flag here: http://www.flagsonline.it/asp/flag.asp/flag_aland/aland.html
and Montenegro flag here: http://en.wikipedia.org/wiki/Flag_of_Montenegro

Araldo
Fuxie - DK
These are already in CVS sources, and will be available for next release wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.