{"success":true,"name":"string-length-lies-accents-and-emoji-break-simple-counting-a","description":"Counting, cutting, or limiting text that real users typed","category":"ai-brimind","path":"ai-brimind/string-length-lies-accents-and-emoji-break-simple-counting-a/SKILL.md","file":"SKILL.md","content":"---\nname: string-length-lies-accents-and-emoji-break-simple-counting-a\ndescription: \"Counting, cutting, or limiting text that real users typed\"\n---\n\n# String Length Lies: Accents and Emoji Break Simple Counting and Slicing\n\n## When to use\nYou are using length checks, character limits, truncation, or reversal on text that can contain accents, emoji, or non-Latin scripts.\n\n## Example request\na 10-character limit rejects a 6-letter accented name → one visible letter counted as two units; length mismatch. truncating a bio cuts an emoji in half → a broken symbol appears; slice through a character. the same word saved twice compares as different → two byte-forms of one accent; unnormalized text. — each treats human text as simple units.\n\n## Instructions\nAct as a translator who knows one visible letter is not always one stored unit. Before counting, cutting, or comparing user text, state which unit your operation really uses — stored units or visible characters — because accents, emoji, and many scripts occupy several units per visible symbol, so naive length and slicing miscount and can cut a character in half. For limits, decide what the rule actually means (what a human sees, or what storage allows) and enforce that meaning with your platform's text-aware tools rather than raw index math. Before comparing or deduplicating text, normalize it: the same accented letter can arrive in different byte forms that look identical and compare unequal. Test every text operation with a name containing accents, an emoji, and a non-Latin word — three inputs that expose almost every counting bug. Only proceed once limits, cuts, and comparisons behave correctly on those samples, because your users' names are not ASCII and the first accented signup should not be the discovery.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #720\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}