Urgent.News

What's breaking now, across thousands of outlets.

Tech

There's no superscript "q" in Unicode — and other things I learned building a superscript generator

Quick quiz: how do you write "x² + y³" in plain text, no HTML, no LaTeX? Easy, right? `²` and `³` are just characters. Now write "E = mcᵠ" — wait, that should be a superscript "q". Try to find it. I'll wait. You won't, because **Unicode has no superscript q**. When I built a [free superscript converter](https://literalkit.com/superscript-generator), this turned out to be the tip of a very weird…

Imagine wanting to write an equation like "E = mcᵠ" in plain text without the use of HTML or LaTeX. Seems straightforward, doesn't it? The characters `²` and `³` simply appear. However, attempting to write "E = mcᵠ" leads to a roadblock as there is no superscript "q" in Unicode. So, the task proves to be more complex than initially thought.

This realization came to light when building a [free superscript converter](https://literalkit.com/superscript-generator). The project revealed a peculiar situation: superscripts are not just a formatting option, but rather separate characters. Unlike bold or italics which are applied styles to characters, superscripts are pre-composed codepoints, individually donated to the Unicode standard by various communities over time.

Different groups donated different superscripts to Unicode. For example, the "¹²³" lived in the Latin-1 Supplement block since the 1980s. Then there's the "⁰ ⁴-⁹ ⁺ ⁻ ⁽ ⁾" in the Superscripts and Subscripts block (U+2070–U+209F). Linguists even needed superscript letters for phonetic transcription, scattered across the Phonetic Extensions block (U+1D2C–U+1D7F). A few stragglers like superscript "x" can be found in Spacing Modifier Letters (U+02E3).

The process of converting text to superscript is not algorithmic, but rather a scavenger hunt, involving looking up each character in a manually assembled mapping table from various parts of the Unicode standard. This process is fraught with challenges. There's no superscript "q", uppercase letters are incomplete, and subscripts are even sparser.

The tool I created consciously opts to inform users when a character cannot be superscripted, rather than faking it with lookalike characters. This approach may seem less visually appealing, but it ensures the copied text accurately reflects the intended meaning.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Vercel CLI overhaul: DNS, domains, project management

This week's tooling news is largely a Vercel story—CLI expansions, observability upgrades, sandbox regionalization, and a free tier reshuffle landed in close succession.

  • Vercel CLI now manages DNS records, domains, and project members
  • JSON output compatible with scripting tools like jq and CI integration
  • Free MiniMax M3 and M2.7 models available until September 6 for testing

More from Thursday 27 August →