From 38b10d5fadeb649b8c9632ce3fc849a1724aaf8d Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 30 Jul 2026 06:16:01 +0900 Subject: [PATCH 1/3] add a counterexample to confirm G9Bc correctness --- test/grapheme.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/grapheme.js b/test/grapheme.js index 8d9056f..8e5b995 100644 --- a/test/grapheme.js +++ b/test/grapheme.js @@ -353,6 +353,10 @@ test('counterexamples', async t => { 'क‌्क', 'क゙्क', 'ൎക്ക', + // GB9c: U+0A4D (Gurmukhi Sign Virama) is *not* InCB=Linker per DerivedCoreProperties.txt; + // the lib must not treat it as one even when it appears inside an InCB=Consonant run from another script + '\u0915\u0A4D\u0915', // DEVANAGARI KA + GURMUKHI VIRAMA + DEVANAGARI KA + '\u0A15\u0A4D\u0A15', // pure Gurmukhi KA + virama + KA (InCB=None - harmless) // Hangul Jamo Extended-B boundaries; U+D7FC..U+D7FF are unassigned '가퟼', 'ퟻ퟼', From e800619e7a8d44d21b85cfcafd0451508587ed92 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 30 Jul 2026 06:19:13 +0900 Subject: [PATCH 2/3] fix it --- src/grapheme.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/grapheme.js b/src/grapheme.js index bf0ec83..fdc8ce8 100644 --- a/src/grapheme.js +++ b/src/grapheme.js @@ -151,7 +151,6 @@ const PAIR = Uint8Array.from(grapheme_pairs); function isLinker(cp) { return cp === 0x094D // Devanagari Sign Virama || cp === 0x09CD // Bengali Sign Virama - || cp === 0x0A4D // Gurmukhi Sign Virama || cp === 0x0ACD // Gujarati Sign Virama || cp === 0x0B4D // Oriya Sign Virama || cp === 0x0C4D // Telugu Sign Virama From 791641a758b89959701c09da110e84579015e8c6 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 30 Jul 2026 06:21:14 +0900 Subject: [PATCH 3/3] changeset --- .changeset/short-toes-fix.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/short-toes-fix.md diff --git a/.changeset/short-toes-fix.md b/.changeset/short-toes-fix.md new file mode 100644 index 0000000..fc1db2d --- /dev/null +++ b/.changeset/short-toes-fix.md @@ -0,0 +1,5 @@ +--- +"unicode-segmenter": patch +--- + +Fixed G9Bc edge case. The `0x0A4D` (Gurmukhi Sign Virama) was incorrectly treated as InCB=Linker.