Hacker News new | ask | show | jobs
by stereo 2154 days ago
That country list doesn't have Kosovo (2008) or South Sudan (2011).
3 comments

A somewhat related problem is that overseas regions (at least for France) are handled as different countries. It makes sense for a CDN, but for most other purposes when I use Internet when I'm on Réunion island my country is "FR", not "RE", since RE is not actually a country. It's also quite inconsistent, I've tried with several IPs from Réunion and some of them are FR while the others are RE.

It doesn't seem to have the same problem with Hawaii for some reason, they're all just US from what I can see.

Also the republic of north Macedonia is still in there by old name ;)
Kosovo is not universally recognised though, to be fair. But yes, I'd include it. Even if you are against in principle, it's de facto a state and treated as such even by many countries not recognising it in name.
But that would mean that your API should return a country specific result to be accurate.
Which is precisely what for example Mapbox does - they allow consumers to specify a worldview, which adjusts borders and other geographic features based on the specified culture: https://docs.mapbox.com/help/glossary/worldview/
They dont have Serbian one to resolve this issue. Or even more relevant ones like Russia (remember Crimea).