Tinker Text and Unicode

by Samy (Kondasamy Jayaraman)

2 bytes punched, read with UTF-8.

Chapter 6 of 7

Same look, different bytes

The search box can’t find “José Núñez”, though the record is right there. Two strings can look the same and hold different bytes.

This chapter: Why do two strings that look the same compare as different?

About this chapter

You will learn

  • é can be one code point or two
  • Normalising makes them match
  • Lookalike letters fool people, not computers

Words you’ll meet

Normalisation
Rewriting text in one standard form, so the same letters get the same code points.
NFC
Unicode’s composed standard form: a letter and its accent become one code point where Unicode has one.
Combining mark
A code point that puts an accent on the letter before it, such as U+0301.
Homograph
A web address that looks like another but uses lookalike letters from another script.

Step 1 of 5

The record holds é as one code point. The search box got e followed by a .

Predict whether they match.

The record’s é and the search box’s é: do they match?