
Character limits across social APIs: .length lies, and it lies both ways
One emoji is 11 UTF-16 units, 1 grapheme and 25 bytes. What each social network really measures, taken from the real APIs.
Tag archive

One emoji is 11 UTF-16 units, 1 grapheme and 25 bytes. What each social network really measures, taken from the real APIs.
"El nombre invisible de TikTok no es un truco de TikTok: es Unicode. Qué caracteres en blanco recorta cada app, cuáles conserva, y cómo detectarlos con unas líneas de JavaScript."

A text-to-binary function can pass every test with Hello and still produce the wrong bytes for...
Here's a one-line test. Run it in your console right now: "مرحبا...
"Why a blank WhatsApp message sends, why an invisible game name breaks after an update, and which zero-width and filler characters survive which app — with code points."
A TTS preprocessing whitelist that removes emojis and symbols was also stripping out Japanese characters like '々', '〆', '髙', and '﨑'. The model, parameters, and cache were all fine — only the input text was corrupted. The lesson: don't remove or preserve symbols arbitrarily; make decisions based on Japanese language needs.
mb_strtolower('İ') does not return 'i'. It returns 'i' plus U+0307 COMBINING DOT ABOVE, so the string gets one code point longer, looks identical on screen, and silently stops matching your keyword. NFC and casefold do not collapse it. Here is what does, plus the unbounded-substring and map-order bugs that were misrouting 35% of a classifier's input.
Someone signs up for your app with the display name 𝓯𝓪𝓷𝓬𝔶 𝓷𝓪𝓶𝓮. Your length check passes. Your...
Triage is done. All that's left is to read the log from the business system. You open the file....
A log file from 1998 lands on your desk. grep ERROR returns nothing. The file is 12 GB, and you can...
The Mathematical Alphanumeric Symbols block looks like a clean 26-letter run you can index into. It is not. Five of its alphabets have gaps where Unicode had already encoded the letter somewhere else, and a naive offset lands you on unassigned codepoints that render as tofu.
Every time I want a slightly-less-boring Instagram bio, I fall into the same trap. I type my caption...