---
title: "Comment by mno tao on \"Unicode Bugs That Look Like Business Logic Bugs\" | Hashnode"
description: "One common source of the decomposed form: file names from macOS. HFS+ stored names decomposed, so when an import key is derived from a file or folder name creat"
url: "https://hashnode.com/posts/unicode-bugs-that-look-like-business-logic-bugs/6acf2f9f68f66d4924d1fdb3/comment/6ad181afeec3044d0b277392"
---

[Discussion](https://hashnode.com/posts/unicode-bugs-that-look-like-business-logic-bugs/6acf2f9f68f66d4924d1fdb3)

Comment [Unicode Bugs That Look Like Business Logic Bugs](https://hashnode.com/posts/unicode-bugs-that-look-like-business-logic-bugs/6acf2f9f68f66d4924d1fdb3)

[mno tao](https://hashnode.com/@dancermno)

[Oct 16](https://hashnode.com/posts/unicode-bugs-that-look-like-business-logic-bugs/6acf2f9f68f66d4924d1fdb3/comment/6ad181afeec3044d0b277392)

One common source of the decomposed form: file names from macOS. HFS+ stored names decomposed, so when an import key is derived from a file or folder name created on a Mac, it can arrive as "Jose\\u0301" while the same name typed into a browser form is usually precomposed. Same NFC step fixes it, but it helps to know where the second variant comes from when you go looking.

On the length section: if the display-name limit is also checked in the browser, JavaScript's string.length counts UTF-16 units too, so client and server can agree with each other and still disagree with the user. Intl.Segmenter with granularity "grapheme" gives the client the same unit as StringInfo.

[Patrick Kearns](https://hashnode.com/@fullstackcity)

[Oct 16](https://hashnode.com/posts/unicode-bugs-that-look-like-business-logic-bugs/6acf2f9f68f66d4924d1fdb3/comment/6ad181afeec3044d0b277392#reply-6ad270c68ac87fa77d40739e)

If you use Grapheme dont forget that counting depends on runtime versions. Modern .NETs StringInfo handles extended grapheme clusters, but versions before .NET 5 behaved differently. Browser and server Unicode versions can also differ, so test shared examples especially emoji sequences and keep server validation authoritative

[mno tao](https://hashnode.com/@dancermno)

[Oct 18](https://hashnode.com/posts/unicode-bugs-that-look-like-business-logic-bugs/6acf2f9f68f66d4924d1fdb3/comment/6ad181afeec3044d0b277392#reply-6ad436a11d93d6dd9f36d25f)

Good point on the runtime versions. Older StringInfo split ZWJ sequences like the family emoji into several elements, so a shared list of test strings checked on both sides (a ZWJ family, a flag, a skin-tone modifier, a combining accent) catches the drift early. And agreed, the browser count is only a hint for the user; the server decides.
