How not to sort a list of countries

by @edent | # # # | 4 comments | Read ~253 times.

Being from the United Kingdom is hard sometimes. When scrolling through a list of countries, we might be found down the bottom as “UK” or near the top as “Great Britain”. Occasionally someone files us under “England” – thus ignoring Wales, Scotland, NI etc. Once in a while, it’ll be “The UK”. Truly, no one has suffered as we have suffered⸮

Here’s a list of countries from the Curve Credit card (join and we both get a fiver!) – I scrolled all the way to the bottom looking for the UK, only to find it nestled between France and Greece!

A list of flags. Estonia, Spain, Finland, France, UK, Greece, Croatia, Hungary, Ireland.

The more you look at the list, the weirder it becomes. Why is Spain next to Estonia? Ah! Because they are Espania! Croatia next to Hungary? A sensible location for the Republika Hrvatska!

I assume they’ve been sorted by each country’s ISO 3166-1 alpha-2 code:

  • EE
  • ES
  • FI
  • FR
  • GB (Because UK might be confused with Ukraine, I guess?)
  • GR
  • HR
  • HU
  • IE

I know there are loads of falsehoods that programmers believe about names, flags, languages, countries, and addresses. So I guess we need to add a “falsehoods programmers believe about sorting lists of countries”!

4 thoughts on “How not to sort a list of countries

  1. Spike says:

    I thought is was USA first then random sort for the rest! 😉

  2. Suomi mainittu, torilla tavataan.


  3. @Edent I’m sure Austria suffered harder, being Österreich in their own language. With an Umlaut, you’ll never know where in the list you end up 😀

  4. zuzak says:

    the UK’s ISO 3166 alpha-2 is technically GB (because when thinking up codes they generally took out words like “republic” or “kingdom”)

    “UK” is actually just exceptionally reserved upon the request of the UK but isn’t technically assigned to the United Kingdom


Leave a Reply

Your email address will not be published. Required fields are marked *