Ages 15–18 · Grades 9–12 · Computer Science · Vietnamese first

LocaleForge

One word, many languages. What does the code count?

A person reads phở as three letters. The software reading it sees three letters — but also five bytes, and, stored a different way, more code points than letters. “How long is this word?” has more than one true answer, and picking the wrong unit is how apps mangle Vietnamese names, cut off German buttons, and sort the alphabet wrong. Read the string, predict what the software measures, then check it against the real engine.

Every answer here is computed by the same Unicode and Intl tools a shipped app uses — nothing is made up. Runs on your device; nothing leaves it.

Loading the strings lab…

A case · you decide

Linh's name field

Linh, 16 — building the sign-up form for a community app used by Vietnamese and English speakers

The idea in play: text is not letters: a person reads characters, software stores bytes and code points, and sorting depends on the language.

Linh limits names to 10 characters by checking the string's length in bytes. A user called Nguyễn Thị Ánh is told her name is too long, and the sorted member list puts every name starting with Đ at the very end.

In UTF-8, 'ễ' takes several bytes. Counted by bytes, a short Vietnamese name looks long.

Sorting by raw code point puts Đ after Z. Vietnamese readers expect it right after D.

How should Linh measure the name length?

How should she sort the member list?

Read a word →

What next? Pick a door

Chosen from what this app is about. What you open is remembered on this device only.