ENES

Unicode

The universal numbering of every letter and symbol, and why accents sometimes break.

The letter ñ gets the Unicode number U+00F1, UTF-8 stores it as two bytes, and reading those bytes with the wrong encoding shows ñ instead

Computers store text as numbers, so every character needs a number. Unicode is the worldwide standard that assigns one: A is U+0041, ñ is U+00F1, the Greek Ω is U+03A9, and the emoji 😀 is U+1F600. It covers virtually every writing system in use, plus many historic ones and a lot of symbols, well over a hundred thousand characters in all. Before Unicode, each region used its own incompatible table, and a file written in one often came out garbled in another.

Unicode says which number each character gets; an encoding says how to write those numbers as bytes in a file or a network message. The dominant one is UTF-8. It stores plain English letters in one byte each, exactly like the old ASCII standard, and uses two to four bytes for everything else. That backward compatibility is a big reason it won: today the vast majority of web pages are UTF-8.

When accents break, this is usually why. If a program writes "año" in UTF-8 and another reads those bytes assuming an older encoding such as Latin-1, each half of the two-byte ñ is shown as a separate character and you get "año". That garbage has a name, mojibake. The fix is almost never to edit the text by hand, but to make both sides agree that the text is UTF-8.

Keep in mind

Go deeper

Related terms

More in Software