Accents and eBooks


The phrase "Swords of Qadisiyyah." But the combining macron over the letter "a" has been rendered as a separate dash.

By and large, the English language doesn't use diacritical marks. Even our loanwords are stripped of them; we drink in a cafe rather than the more pretentious café. This has a consequence for HTML and, by extension, eBooks. As a quick primer, modern computing gives us two main ways of displaying a letter with an accent. The first is simple - encode every single accented letter as a separate "pre-composed" character. So è (U+00E8), é (U+00E0), ê (U+00EA, and ë (U+00EB) are all stored as diff…

Continue reading →

Where you can (and can't) use Emoji in PHP


Group of emoji.

I was noodling around in PHP the other day and discovered that this works: <?php $🍞 = "bread"; echo "Some delicious " . $🍞; I mean, there's no reason why it shouldn't work. An emoji is just a Unicode character (OK, not just a character - but we'll get on to that), so it should be fine to use anywhere. Emoji work perfectly well as function names: function 😺🐶() { echo "catdog!"; } 😺🐶(); Definitions: define( "❓", "huh?" ); echo ❓; And, well, pretty much everywhere: class 🦜 { publi…

Continue reading →

Internationalise The Fediverse


Translation icon. By Linh Nguyen.

We live in the future now. It is OK to use Unicode everywhere. It seems bizarre to me that modern Internet services sometimes "forget" that there's a world outside the Anglosphere. Some people have the temerity to speak foreign languages! And some of those languages have accents on their letters!! Even worse, some don't use English letters at all!!! A decade ago, I was miffed that GitHub only supported some ASCII characters in its project names. There's no technical reason why your repo can't …

Continue reading →

A small text rendering bug in legal judgements


Screenshot of text. Highlighted are a couple of instances of a question mark followed by the letters "o", "u", "r".

OK, first off, you have to read this amazing judgement about whether Walker's Sensations Poppadoms count as a potato-based snack for VAT purposes. Like most judgements, it is written in fairly plain and accessible language. The arguments are easy to follow and it even manages to throw in a little humour. But if you read closely, you'll see there are a few instances where an errant question-mark pops up: From context, it is pretty clear the word should be "flour" but is rendered as "?our" - …

Continue reading →

Unicode Roman Numerals and Screen Readers


Screenshot of a Table of Roman numerals in Unicode.

How would you read this sentence out aloud? "In Hamlet, Act Ⅳ, Scene Ⅸ..." Most people with a grasp of the interplay between English and Latin would say "In Hamlet, Act four, scene nine". And they'd be right! But screen-readers - computer programs which convert text into speech - often get this wrong. Why? Well, because I didn't just type "Uppercase Letter i, Uppercase Letter v". Instead, I used the Unicode symbol for the Roman numeral 4 - Ⅳ. And, it turns out, lots of screen-readers have …

Continue reading →

Unicode operators for semantically correct programming


Why do most programming languages use the / character when we have a perfectly good ÷ symbol? Similarly, why use != instead of ≠? Or => rather than →? The obvious answer is that the humble keyboard usually only has around 100 keys - and most humans have a hard time remembering where thousands of alternate characters are. Some programming fonts attempt to get around this with ligatures. That allows the user to type <= but have the font display ≤ Are there any modern programming languages whic…

Continue reading →

YOU DON'T NEED HTML!


Black and white text banner proclaiming that you don't need HTML.

Originally posted as part of HTML Hell's advent calendar. While browsing Mastodon late one night, I came across this excellent blog post called HTML is all you need to make a website. It describes a few websites which are pure HTML. No CSS and no JS. And I thought… do you even need HTML to make a website? A few hours later, I launched the NO-HT.ML website. Proving, once and for all, that you don't need HTML to make a beautiful responsive, and useful website which everyone will love. Go t…

Continue reading →

Some more silly Punycode domain names


The logo for the band Spinal Tap. The logo looks like it has been chiselled out of heavy metal by virgin nuns who only wish to please the gods of rock and roll.

You know how it is, you buy one silly domain name and then you get an idea for loads more! A few weeks ago, I got https://⏻.ga/ - I think I'm the first person to get a domain name which uses a glyph from the Miscellaneous Symbols Unicode block. How exciting! And that got me wondering… what other abuses of the Punycode algorithm can I whack into DNS? Well, here's some I whipped up using FreeNom - they offer free domain names on the .ga TLD (and a few others) and are very liberal in accepting P…

Continue reading →

Not Quite Emoji Domain Names


A bright red power symbol.

@font-face { font-family: "power"; src:…

Continue reading →

The (Mostly) Complete Unicode Spiral


Zoomed out view of a dense spiral.

I present to you, dear reader, a spiral containing every Unicode 14 character in the GNU Unifont. Starting at the centre with the control characters, spiralling clockwise through the remnants of ASCII, and out across the entirety of the Basic Multi Lingual Plane. Then beyond into the esoteric mysteries of the Higher Planes. Zoom in for the massiveness. It's a 10,000x10,000px image. Because the Unifont displays individual characters in a 16x16px square, it is quite legible even when printed …

Continue reading →

Why doesn't Disney+ support accents in profile names?


An apostrophe in Donald O'Duck causes the profile name to display an error.

Because I'm genetically pre-disposed to watch every piece of Star Wars content ever created, I signed up for a free trial of Disney's newest streaming service. As part of onboarding, it asked me to create a profile name. This is typically done so that multi-user households can have separate profiles and preferences. Mum doesn't have her princess stories disrupting Dad's suggestions. And Junior doesn't see what filth their parents are watching late at night. All the better to build up detailed…

Continue reading →

EBCDIC is incompatible with GDPR


Dutch text and a diagram.

Welcome to acronym city! The Court of Appeal of Brussels has made an interesting ruling. A customer complained that their bank was spelling the customer's name incorrectly. The bank didn't have support for diacritical marks. Things like á, è, ô, ü, ç etc. Those accents are common in many languages. So it was a little surprising that the bank didn't support them. The bank refused to spell their customer's name correctly, so the customer raised a GDPR complaint under Article 16. The data subj…

Continue reading →