<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>flag &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/flag/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sun, 02 Nov 2025 09:51:15 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>flag &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[How not to sort a list of countries]]></title>
		<link>https://shkspr.mobi/blog/2021/05/how-not-to-sort-a-list-of-countries/</link>
					<comments>https://shkspr.mobi/blog/2021/05/how-not-to-sort-a-list-of-countries/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 03 May 2021 11:42:45 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[unicode]]></category>
		<category><![CDATA[ux]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=38859</guid>

					<description><![CDATA[Being from the United Kingdom is hard sometimes. When scrolling through a list of countries, we might be found down the bottom as &#34;UK&#34; or near the top as &#34;Great Britain&#34;. Occasionally someone files us under &#34;England&#34; - thus ignoring Wales, Scotland, NI etc.  Once in a while, it&#039;ll be &#34;The UK&#34;. Truly, no one has suffered as we have suffered⸮  Here&#039;s a list of countries from the Curve Credit card (…]]></description>
										<content:encoded><![CDATA[<p>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⸮</p>

<p>Here's a list of countries from the <a href="https://www.curve.app/join#D4MK9ZKN">Curve Credit card</a> (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!</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/04/flags.png" alt="A list of flags. Estonia, Spain, Finland, France, UK, Greece, Croatia, Hungary, Ireland." width="300" height="576" class="aligncenter size-full wp-image-38860">

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

<p>I <strong>assume</strong> they've been sorted by each country's <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a> code:</p>

<ul>
<li>EE</li>
<li>ES</li>
<li>FI</li>
<li>FR</li>
<li>GB (Because UK might be confused with Ukraine, I guess?)</li>
<li>GR</li>
<li>HR</li>
<li>HU</li>
<li>IE</li>
</ul>

<p>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"!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=38859&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/05/how-not-to-sort-a-list-of-countries/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[<input type="country" />]]></title>
		<link>https://shkspr.mobi/blog/2017/11/input-type-country/</link>
					<comments>https://shkspr.mobi/blog/2017/11/input-type-country/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 02 Nov 2017 07:35:10 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=28790</guid>

					<description><![CDATA[Recently, Lea Verou asked an important question about whether HTML should have a standardised way of letting users select a country from a list.  Lea Verou@LeaVerouHTML Idea: &#60;input type=&#34;country&#34;&#62; which would become a searchable dropdown with all countries and their flags.Wouldn&#039;t that be awesome?❤️ 1,863💬 113🔁 013:17 - Sat 21 October 2017  You can read through the conversation and make your own …]]></description>
										<content:encoded><![CDATA[<p>Recently, Lea Verou asked an important question about whether HTML should have a standardised way of letting users select a country from a list.</p>

<blockquote class="social-embed" id="social-embed-921727157705035776" lang="en" itemscope="" itemtype="https://schema.org/SocialMediaPosting"><header class="social-embed-header" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><a href="https://twitter.com/LeaVerou" class="social-embed-user" itemprop="url"><img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRg4FAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSPkBAAABkFxt26Inz7xfPA3oyt0qwR2W7m4VxBNqcVauFTj76C84zPu+DzqZ+SqIiAlAZgkAhnbP3Hy98vXr0usbU7sGAQRBzkkA2k8/qTJz5fHJViAkuQjQM7NOUtXcSXdTI7k21Q1IDgGNF1dIU2NmUyOXzzUgbChg9AmZOnP0lHw0jJAtCdhRohpzNuXaVoRMAUd+MmWBKX8cRMgQcIw0FmrkIYT/CLb9UGPBpt83Qf4hGCzRWLhxrQ8CIJGmZ1RGqHzcIAkQcJnKKJVnESBJz5pZHGbLnYkI5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pzH/+kB5z9+7rmImA2owaUZzd9uzL2JWs0XnFZwvfdt2LIz98YfaeFN2pIhuv4WY3g8RviPjQKXUv9BUHjIy9vMQSnZDf58SWWGMUEJULFuNKVO8/FHs7z1kO9Xw/5y14YOJ7xxAVjT1/6d+yxNqv33k/4AEyCwTlGfc52BdPtK85mUGtDXpZBh6umP8x8UhbT5gcOfnlSYVMvdraUI6PGnsj5rGsHRJsPOi2yYc8rHL6GosV81rPG/Oca+IzJLuyYVVy7EEGitFvGoSp5yAfpODsybcgGjE5XUqkpv8FV+reJdTcg+/6UCFE7qUi0GyUR/J/nIasAAAA" alt="" itemprop="image"><div class="social-embed-user-names"><p class="social-embed-user-names-name" itemprop="name">Lea Verou</p>@LeaVerou</div></a><img class="social-embed-logo" alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0Aaria-label%3D%22Twitter%22%20role%3D%22img%22%0AviewBox%3D%220%200%20512%20512%22%3E%3Cpath%0Ad%3D%22m0%200H512V512H0%22%0Afill%3D%22%23fff%22%2F%3E%3Cpath%20fill%3D%22%231d9bf0%22%20d%3D%22m458%20140q-23%2010-45%2012%2025-15%2034-43-24%2014-50%2019a79%2079%200%2000-135%2072q-101-7-163-83a80%2080%200%200024%20106q-17%200-36-10s-3%2062%2064%2079q-19%205-36%201s15%2053%2074%2055q-50%2040-117%2033a224%20224%200%2000346-200q23-16%2040-41%22%2F%3E%3C%2Fsvg%3E"></header><section class="social-embed-text" itemprop="articleBody">HTML Idea: &lt;input type="country"&gt; which would become a searchable dropdown with all countries and their flags.<br>Wouldn't that be awesome?</section><hr class="social-embed-hr"><footer class="social-embed-footer"><a href="https://twitter.com/LeaVerou/status/921727157705035776"><span aria-label="1863 likes" class="social-embed-meta">❤️ 1,863</span><span aria-label="113 replies" class="social-embed-meta">💬 113</span><span aria-label="0 reposts" class="social-embed-meta">🔁 0</span><time datetime="2017-10-21T13:17:33.000Z" itemprop="datePublished">13:17 - Sat 21 October 2017</time></a></footer></blockquote>

<p>You can read through the conversation and make your own mind up (while also marvelling at the witless mansplainers) - but I'd like to give you my considered take on it.</p>

<p>(Disclaimer - I'm an editor on the HTML 5.3 spec and I work for the UK Government. This is a personal blog post and doesn't represent the views of my employers, associates, or friends.)</p>

<h2 id="who-are-you"><a href="https://shkspr.mobi/blog/2017/11/input-type-country/#who-are-you">Who Are You?</a></h2>

<p>Let's start with the big one.  What is a country?  This is about as contentious as it gets! It involves national identities, international politics, and hereditary relationships.</p>

<p>Scotland, for example, is a country.  <a href="http://www.parliament.uk/about/living-heritage/evolutionofparliament/legislativescrutiny/act-of-union-1707/overview/">That is a (fairly) uncontentious statement</a> - and yet in drop-down lists, I rarely see it mentioned. Why? Because it is one of the four countries which make up the country of the United Kingdom - and so it is usually (but not always) subsumed into that.</p>

<p>Some countries don't recognise each other.  Some believe that the other country is really part of <em>their</em> country.  <a href="https://en.wikipedia.org/wiki/Gregor_MacGregor#Poyais_scheme">Some countries don't exist</a>.</p>

<p>There are two main schemes to classify what is and isn't a country.  The first is ISO 3166-1.  It provides two- and three-letter codes for every country.  Well... sort of.</p>

<p>ISO 3166 contains 249 different countries, territories, protectorates, principalities, duchies, and other bits-and-bobs. It contains the Falklands, but not Scotland.</p>

<p>The second is... whatever your country says is another country!</p>

<p>My friends in the Government Registers Team have published <a href="https://web.archive.org/web/20171219102544/https://country.register.gov.uk/">a canonical list of every country that the UK recognises</a>. There are 199 entries. Which countries are <em>not</em> in there is left as an exercise for the reader.</p>

<p>The UK's register of countries should allow every Government website to have the same list in a drop down. When new countries are recognised, one list needs to be updated - and then all websites automagically update. In theory.</p>

<p>Incidentally, that list of 199 countries includes four entries for countries <strong>which no-longer exist</strong>. For example Yugoslavia.</p>

<p>Which brings us to the next question...</p>

<h2 id="whats-the-use-case"><a href="https://shkspr.mobi/blog/2017/11/input-type-country/#whats-the-use-case">What's the use case?</a></h2>

<p>The most obvious one is "I want to give a site my current address" - presumably for identification purposes or postal deliveries.</p>

<p>But what if the use case is "I want to say where I was born"?</p>

<p>Borders shift.  Countries disappear, merge, split, change names, change flags, and do all manner of weird things which trip up your edge cases.</p>

<p>The user may want to find the name in their own script - for example would a Greek user be looking for "Greece" or "Ελλάδα"?  If a Chinese speaker wants to visit the UK, do they look in the drop-down for "英国"?</p>

<p>International Dialling Codes - not every country is unique - <code>+1</code> is used by USA, Canada, Anguilla, Dominican Republic, and dozens more. Are there <a href="https://github.com/mledoze/countries/issues/114">countries where there is more than one international dialling code</a>?</p>

<p>OK, what if the user wants to select their language based on their country?</p>

<h2 id="do-you-have-a-flag"><a href="https://www.youtube.com/watch?v=hYeFcSq7Mxg">Do You Have A Flag?</a><a href="https://shkspr.mobi/blog/2017/11/input-type-country/#do-you-have-a-flag">🔗</a></h2>

<p>It is one of the classic conventions that first-year students of user interface design are taught - <a href="http://www.flagsarenotlanguages.com/blog/why-flags-do-not-represent-language/">countries do not represent language</a>!</p>

<p>Some countries have multiple official languages.  Some users may not speak the language of their country. Some languages are only used for official purposes, and not by the general population.</p>

<p>Flags <em>mostly</em> represent countries.  There are people in Wales who would rather see Y Ddraig Goch  rather than the <a href="https://www.flaginstitute.org/wp/british-flags/the-union-jack-or-the-union-flag/">Union Jack</a>. And vice-versa.  Flags can make people angry.</p>

<p>The flag of the USA last changed in 1960 - but <a href="https://www.washingtonpost.com/news/worldviews/wp/2017/08/08/mauritanias-president-bundles-a-patriotic-flag-change-with-abolishing-the-senate/">Mauritania changed theirs in August 2017</a>. How quickly can a browser update their list of countries?</p>

<h2 id="and-yet"><a href="https://shkspr.mobi/blog/2017/11/input-type-country/#and-yet">...and yet...</a></h2>

<p>I instinctively <em>like</em> this idea! <a href="https://twitter.com/Glightstar/status/714203191999664129">This isn't a new question</a>, nothing ever is, but I think it is an idea which has merit.</p>

<p>One of the goals of HTML is to stop web developers having to re-invent the wheel. That's why we have lots of different <code>&lt;input&gt;</code> types - to reduce complexity.</p>

<p>Colour picker <input type="color"></p>

<p>Number inputs <input id="number" type="number" value="42"></p>

<p>Range selector <input type="range"></p>

<p>Some modern browsers support date input <input id="date" type="date"></p>

<p>The challenges of a country selector are...</p>

<ol>
<li>Keeping everyone happy and not causing major diplomatic incidents. Easy‽</li>
<li>Usability. Making sure it's easy to search for the name of a country.</li>
<li>Consistency. How do you indicate that this list contains historic countries?</li>
</ol>

<p>None of these are insurmountable problems - but it's far from trivial.</p>

<p>And yet... I think there is a real possibility that this could work. Millions of websites already find ways to cope with the ambiguity - perhaps browsers can too?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=28790&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2017/11/input-type-country/feed/</wfw:commentRss>
			<slash:comments>35</slash:comments>
		
		
			</item>
	</channel>
</rss>
