Unicode: a shared catalogue of characters
Unicode gives letters, punctuation, symbols, and many other text elements shared numbers and rules. That lets programs exchange text from different writing systems. Your name can contain é, your message can contain ありがとう, and your game can display 🐢.
Three different jobs
Imagine a catalogue of picture cards:
- Unicode identifies which card you mean.
- UTF-8 describes how to store its identity in bytes.
- A font supplies the visible drawing of the character.
Changing the font can change how a letter looks without changing the stored text. A missing picture in a font may appear as an empty box. That does not automatically mean the text file is broken.
The Unicode character FAQ explains why a visible character can sometimes involve several numbered elements.
In Pliro
# language: en
let greeting = "Hallo, Zoë! 🐢"
say greeting
The program prints the text between the quotes. The syntax directive chooses Pliro keywords; it does not restrict your text to English letters.
Unicode also helps Pliro recognize many letters in variable names. Names still follow identifier rules. Some symbols have special jobs: quotes surround text and # starts a comment outside text.
Try a name
Replace Zoë with a name containing an accent. Keep the quotes around the message. If a character looks wrong, check the font and encoding before changing the program’s logic.
