RESOLVED FIXED312596
[JSC] Intl.Segmenter `isWordLike` returns false for numeric segments due to off-by-one in UBRK_WORD_NONE_LIMIT check
https://bugs.webkit.org/show_bug.cgi?id=312596
Summary [JSC] Intl.Segmenter `isWordLike` returns false for numeric segments due to o...
Alistair
Reported 2026-04-17 12:26:09 PDT
Intl.Segmenter with granularity:"word" reports isWordLike:false for numeric segments. for (const s of new Intl.Segmenter("en", {granularity:"word"}).segment("abc 123 v2")) print(s.segment, s.isWordLike); // JSC: abc true / 123 false / v2 false // V8: abc true / 123 true / v2 true IntlSegmentDataObject.h checks `ruleStatus <= UBRK_WORD_NONE_LIMIT`, but ICU's UWordBreak ranges are half-open (UBRK_WORD_NONE_LIMIT == UBRK_WORD_NUMBER == 100), so the comparison should be `<`.
Attachments
Alistair
Comment 1 2026-04-17 12:38:39 PDT
EWS
Comment 2 2026-04-17 20:43:08 PDT
Committed 311507@main (0145d169cd9c): <https://commits.webkit.org/311507@main> Reviewed commits have been landed. Closing PR #62999 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2026-04-17 20:44:12 PDT
Note You need to log in before you can comment on or make changes to this bug.