ArticleslgStudy

computer science

Unicode equivalence

Unicode equivalence is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Unicode equivalence rather than just read about it. In short: Unicode equivalence is the specification by the Unicode character encoding standard that some sequences of code points represent essentially the same character. The feature was introduced in the standard to allow compatibility with pre-existing standard character sets, which often included similar or identical characters.

Key takeaways

  • Unicode equivalence belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Unicode equivalence to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Unicode equivalence from memory before moving on to harder problems.

Reference excerpt

Unicode equivalence is the specification by the Unicode character encoding standard that some sequences of code points represent essentially the same character. The feature was introduced in the standard to allow compatibility with pre-existing standard character sets, which often included similar or identical characters. Unicode provides two such notions, canonical equivalence and compatibility. Code point sequences that are defined as canonically equivalent are assumed to have the same appearance and meaning when printed or displayed. For example, the code point U+006E n LATIN SMALL LETTER N followed by U+0303 ◌̃ COMBINING TILDE is defined by Unicode to be canonically equivalent to the single code point U+00F1 ñ LATIN SMALL LETTER N WITH TILDE. Therefore, those sequences should be displayed in the same manner, should be treated in the same way by applications such as alphabetizing names or searching, and may be substituted for each other. Similarly, each Hangul syllable block that is encoded as a single character may be equivalently encoded as a combination of a leading conjoining jamo; a vowel conjoining jamo; and, if appropriate, a trailing conjoining jamo. Sequences that are defined as compatible are assumed to have possibly distinct appearances but the same meaning in some contexts. Thus, for example, U+FB00 ff LATIN SMALL LIGATURE FF, a typographic ligature, is defined to be compatible with, but not canonically equivalent to, the sequence U+0066 U+0066 (two Latin "f" letters). Compatible sequences may be treated the same way in some applications (such as sorting and indexing) but not in others, and they may be substituted for each other in some situations, but not in others. Sequences that are canonically equivalent are also compatible, but the opposite is not necessarily true. The standard also defines a text normalization procedure, called Unicode normalization, which replaces equivalent sequences of characters so that any two texts that are equivalent will be reduced to the same sequence of code points, called the normalization form or normal form of the original text. For both of the equivalence notions, Unicode defines two normal forms, one fully composed (where multiple code points are replaced by single points whenever possible) and one fully decomposed (where single points are split into multiple ones).

Sources of equivalence

Character duplication

For compatibility or other reasons, Unicode sometimes assigns two different code points to entities that are essentially the same character. For example, the letter "A with a ring diacritic above" is encoded as U+00C5 Å LATIN CAPITAL LETTER A WITH RING ABOVE (a letter of the alphabet in Swedish and several other languages) or as U+212B Å ANGSTROM SIGN. However, the symbol for angstrom is defined to be that Swedish letter, and most other symbols that are letters (such as ⟨V⟩ for volt) do not have a separate code point for each usage. In general, the code points of truly identical characters are defined to be canonically equivalent.

Combining and precomposed characters For consistency with some older standards, Unicode provides single code points for many characters that could be viewed as modified forms of other characters (such as U+00F1 for "ñ" or U+00C5 for "Å") or as combinations of two or more characters (such as U+FB00 for the ligature ff or U+0132 for the Dutch letter ij) For consistency with other standards and greater flexibility, Unicode also provides codes for many elements that are not used on their own but are meant instead to modify or combine with a preceding base character. Examples of those combining characters are U+0303 ◌̃ COMBINING TILDE and the Japanese diacritic dakuten (U+3099 ◌゙ COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK). In the context of Unicode, character composition is the process of replacing the code points of a base letter followed by one or more combining characters into a single precomposed character; and character decomposition is the opposite process. In general, precomposed characters are defined to be canonically equivalent to the sequence of their base letter and subsequent combining diacritic marks, whatever order they may occur.

Example

Typographical non-interaction Some scripts regularly use multiple combining marks that do not, in general, interact typographically, and do not have precomposed characters for the combinations. Pairs of such non-interacting marks can be stored in either order. Generally, the alternative sequences are canonically equivalent. The rules that define their sequencing in the canonical form also define whether they are considered to interact.

Typographic conventions Unicode provides code points for some characters or groups of characters that are modified only for aesthetic reasons (such as ligatures, the half-width katakana characters, or the full-width Latin letters for use in Japanese texts) or to add new semantics without losing the original one (such as digits in subscript or superscript positions, or the circled digits (such as "①") inherited from some Japanese fonts). Such a sequence is considered compatible with the sequence of original (individual and unmodified) characters for the benefit of applications where the appearance and added semantics are not relevant. However, the two sequences are not declared canonically equivalent since the distinction has some semantic value and affects the rendering of the text.

Encoding errors UTF-8 and UTF-16 (and also some other Unicode encodings) do not allow all possible sequences of code units. Different software will convert invalid sequences into Unicode characters using varying rules, some of which are very lossy (such as by turning all invalid sequences into the same character). That can be considered a form of normalization and can lead to the same difficulties as others.

Normalization A text processing software implementing the Unicode string search and comparison functionality must take into account the presence of equivalent code points. In the absence of that feature, users searching for a particular code point sequence would be unable to find other visually indistinguishable glyphs that have a different but canonically equivalent code point representation.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Unicode equivalence

Start with the simplest possible case. Write down what Unicode equivalence claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Unicode equivalence before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Unicode equivalence ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Unicode equivalence

In research
Unicode equivalence appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Unicode equivalence in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Unicode equivalence is common in secondary-school and first-year university syllabi. It links to neighbouring topics Unicode algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Unicode equivalence outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Unicode equivalence” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Unicode equivalence in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Unicode equivalence means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Unicode equivalence out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Unicode equivalence in simple terms?

Unicode equivalence is the specification by the Unicode character encoding standard that some sequences of code points represent essentially the same character. The feature was introduced in the standard to allow compatibility with pre-existing standard character sets, which often included similar…

Why does Unicode equivalence matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Unicode equivalence?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Unicode equivalence.

Tags

  • Unicode algorithms

Keep exploring