ended3월 16일· 1 sources
Why Your Input Length Limit Is Wrong
입력 길이 제한이 잘못된 이유
Why it matters
Standard string length checks (UTF-16 code units, bytes, or code points) do not match what users perceive as a single character, because composed characters, Indic scripts, and emoji sequences form multi-code-point grapheme clusters. Enforcing input limits at the wrong boundary can corrupt text by splitting combining marks or emoji joiners. The recommended fix is to measure length using grapheme clusters via APIs like Intl.Segmenter.
1
Sources
+0
24h
—
Growth
189d
Active
grapheme clusterUnicodeIntl.SegmentermaxlengthUTF-16