Tinker Text and Unicode

by Samy (Kondasamy Jayaraman)

Turned away: 20 bytes, column 48.

Chapter 7 of 7

Workbench: the name field

Larkspur Supply Co.’s new sign-up form has a name field, and the customer file stores names in a column of fixed bytes.

This chapter: What should a name field count, and up to how many, so every name fits and matches?

About this chapter

You will learn

  • Count what the store counts
  • Normalise before you compare
  • What people see has no byte limit

Words you’ll meet

Column limit
The most bytes the customer file stores for a name: a planning number written for this site.

Step 1 of 2

The : 48 bytes. Every name accepted and matching its record, and nothing typed may overflow.

Set the count, limit and normalising.

3 of 9 accepted · 7 of 9 match · worst case unbounded NOT YET

One grapheme can hold any number of accents, so nothing caps the bytes.

Each customer, as the form keeps the name
NameCountedBytesMatches
Zoë Okafor1011✓ yes
José Núñez1016✗ no
Siobhán Ní Bhriain18 ✗20✓ yes
Nguyễn Thị Minh Khai20 ✗26✗ no
Ελένη Παπαδοπούλου18 ✗35✓ yes
Олександра Шевченко19 ✗37✓ yes
王秀英39✓ yes
Björn Guðmundsson17 ✗19✓ yes
Ana Lúcia Gonçalves19 ✗21✓ yes

The names are fictional customers in real-world spellings; the column’s size is a planning number for this site.