Unicode is the international standard that assigns a unique number, called a code point, to every character used in writing systems, symbols and emoji, so that text keeps its meaning when it moves between programs, devices and operating systems. In software interoperability it is the common vocabulary for text: two applications that agree on Unicode can exchange names, documents and messages in any language without guessing which character set the other side used.
The standard is maintained by the Unicode Consortium and kept synchronized with the international standard ISO/IEC 10646. It defines far more than a list of characters: it also specifies properties, normalization, sorting, line breaking and bidirectional display, which together decide whether text is processed correctly once it arrives.
How Unicode separates characters from bytes
Unicode works by splitting text handling into two distinct layers: an abstract character repertoire and the encoding forms that turn code points into bytes. A code point is written as U+ followed by hexadecimal digits, for example U+0041 for the Latin capital A and U+20AC for the euro sign. The codespace runs from U+0000 to U+10FFFF, which gives room for 1,114,112 code points, of which roughly 150,000 are currently assigned to characters.
The codespace is divided into 17 planes of 65,536 code points each. Plane 0, the Basic Multilingual Plane (BMP), holds most modern scripts, while the supplementary planes hold historic scripts, rare ideographs, mathematical symbols and most emoji. This split matters in practice because older software that assumed every character fits in 16 bits fails precisely on supplementary characters.
The following table shows the main structural units that the standard defines and why each one affects interoperability.
| Unit | What it is | Why it matters |
|---|---|---|
| Code point | A number from U+0000 to U+10FFFF | Identifies one abstract character |
| Plane | A block of 65,536 code points | Separates BMP from supplementary characters |
| Code unit | The 8, 16 or 32-bit storage unit of an encoding form | Determines string length in memory |
| Grapheme cluster | What a reader perceives as one character | Governs cursor movement and truncation |
| Surrogate pair | Two 16-bit units representing one code point | Breaks naive UTF-16 string handling |
Unicode encoding forms and their trade-offs
Unicode defines three standard encoding forms, UTF-8, UTF-16 and UTF-32, and all of them can represent every code point without loss. They differ in storage size, compatibility with legacy systems and the effort needed to index a string. Choosing between them is an engineering decision, not a question of which characters are supported.
The comparison below summarizes where each form is typically found in software and what developers must watch for.
| Encoding form | Bytes per code point | Typical home | Main caveat |
|---|---|---|---|
| UTF-8 | 1 to 4 | Web, files, network protocols, Linux | Variable length complicates indexing |
| UTF-16 | 2 or 4 | Windows APIs, Java, JavaScript strings | Surrogate pairs and byte order |
| UTF-32 | 4 | Internal processing in some libraries | Large memory footprint |
UTF-8 has become the default interchange encoding because it is backward compatible with ASCII and has no byte-order ambiguity. UTF-16 persists inside platforms whose string types were designed in the early 1990s, so most real systems convert at their boundaries. The neighboring Terms on character encoding and UTF-8 cover the byte-level mechanics in more detail.
Normalization, equivalence and comparison
Unicode normalization is the process that converts equivalent character sequences into one consistent form so that they compare as equal. The letter “é” can be stored as a single precomposed code point U+00E9 or as the letter e followed by a combining acute accent U+0301. Both render identically, yet a byte-by-byte comparison treats them as different strings.
The standard defines four normalization forms, which differ in whether they compose or decompose characters and whether they apply compatibility mappings.
| Form | Operation | Typical use |
|---|---|---|
| NFC | Canonical decomposition, then composition | Default for storage and the web |
| NFD | Canonical decomposition only | Some file systems and linguistic processing |
| NFKC | Compatibility decomposition, then composition | Identifiers, search keys, usernames |
| NFKD | Compatibility decomposition only | Text analysis and indexing |
Compatibility forms are lossy: they turn the ligature “fi” into “fi” and a superscript two into a plain digit. They are suited to matching and search, but applying them to stored documents silently changes content. A sound rule is to normalize to NFC at system boundaries and use NFKC only for comparison keys.
Character properties and text algorithms
Beyond code points, the Unicode Character Database assigns each character properties such as general category, script, case mappings, numeric value and bidirectional class. Software relies on these properties for case-insensitive matching, word segmentation and validation of input. Hard-coding rules such as “letters are A to Z” breaks as soon as users type in Greek, Arabic or Devanagari.
Several companion specifications, published as Unicode Standard Annexes and Technical Standards, define algorithms that interoperable software is expected to share:
- Bidirectional algorithm (UAX #9) for mixing right-to-left and left-to-right text
- Text segmentation (UAX #29) for grapheme, word and sentence boundaries
- Line breaking (UAX #14) for wrapping text in layouts
- Collation algorithm (UTS #10) for language-aware sorting
- Security mechanisms (UTS #39) for detecting confusable characters
Locale data that tailors these algorithms, such as sorting rules for Swedish or date formats for Japanese, comes from the Common Locale Data Repository (CLDR), which the Consortium maintains alongside the standard.
Common Unicode failures in software
Most Unicode problems in software come from mismatched assumptions at boundaries rather than from missing characters. A file written in one encoding and read as another, a database column with a legacy character set or a string function that counts code units instead of characters all produce visible defects.
The table below links typical symptoms to their usual causes and fixes.
| Symptom | Likely cause | Fix |
|---|---|---|
| Mojibake such as “é” instead of “é” | UTF-8 bytes decoded as Windows-1252 | Declare and verify the encoding at every interface |
| Replacement character U+FFFD | Invalid byte sequences during decoding | Reject or log invalid input at the source |
| Emoji split into two boxes | Truncation inside a surrogate pair | Truncate on grapheme cluster boundaries |
| Duplicate accounts with identical names | Missing normalization before comparison | Normalize and case-fold usernames |
| Lookalike domain or username | Homograph attack with confusable letters | Apply confusable detection and script mixing rules |
A frequent misconception is that one code point equals one visible character. Flags, skin-tone emoji and many Indic syllables consist of several code points, so length limits, cursor logic and substring operations should work on grapheme clusters whenever users can see the result.
The short version
Computers store letters as numbers. In the past, different countries and companies used different number tables, so the same number could mean a Czech letter on one computer and a Russian letter on another. Text often turned into nonsense when it traveled between systems.
Unicode is one shared table for the whole world. Every letter, symbol and emoji gets its own permanent number, so any program that follows the standard reads the text exactly as it was written. It works like a universal dictionary that every computer has agreed to use.
Where it makes a difference
A logistics company merges customer records from a German warehouse system, a Polish billing tool and a French web shop. The older systems store names in three different legacy code pages, and the first test import shows thousands of corrupted surnames, with “Müller” appearing as “Müller” and Polish letters replaced by question marks.
The integration team converts every source to UTF-8 at the import stage, normalizes all names to NFC and adds a check that rejects invalid byte sequences instead of silently replacing them. Duplicate detection then compares case-folded, normalized names. After the change, the merged database of about 400,000 customers shows no corrupted names, and roughly 2,300 duplicates that differed only in accent encoding are correctly identified and merged.