Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-05
16:41 • Closed ticket [3b2a527ed3]: grapheme.test failures with Unicode 18 plus 5 ot... artifact: 0466cd36ff user: apnadkarni
16:39
Fix [3b2a527e] - backward grapheme traversal across INDIC LINKER code point check-in: a675fa551b user: apnadkarni tags: trunk, main
14:48 • Ticket [3b2a527ed3] grapheme.test failures with Unicode 18 status still Open... artifact: dc56270c53 user: jan.nijtmans
2026-10-04
17:50
Fix for [3b2a527ed3] - grapheme prev failures check-in: fb18e9d7a0 user: apnadkarni tags: bug-3b2a52-apn
17:06 • Ticket [3b2a527ed3] grapheme.test failures with Unicode 18 status still Open... artifact: e2fb6c30f8 user: apnadkarni
13:03 • Ticket [3b2a527ed3]: 4 changes artifact: b77ec99528 user: apnadkarni
2026-10-02
18:56 • Ticket [3b2a527ed3]: 3 changes artifact: 029c697801 user: jan.nijtmans
2026-08-26
15:40 • Ticket [3b2a527ed3]: 3 changes artifact: c52e9c62a9 user: jan.nijtmans
15:18 • Ticket [3b2a527ed3]: 3 changes artifact: 43cb64565a user: apnadkarni
12:48
Testcases for [3b2a527ed3]: grapheme.test failures with Unicode 18 closed check-in: 28dad48b93 user: jan.nijtmans tags: bug-3b2a527ed3
12:45 • New ticket [3b2a527ed3] grapheme.test failures with Unicode 18. artifact: 4043a96a2a user: jan.nijtmans

grapheme.test failures with Unicode 18

Closed / Fixed3b2a527ed38d5d1ad4de35454f608d11d3149a5bCreated 98 days agoUpdated 58 days ago
Descriptionwiki2026-08-26 12:45:59
When running the grapheme.test testcases (Tcl current trunk), 4 testcases failes. This is not a bug in Tcl, since Tcl makes use of / depends on utf8proc for this task. Since Unicode 18 is still in beta, it's not possible to draw a conclusion whether the utf8proc implementating is wrong or the Unicode 18 test vectors.

This ticket is just meant to track the issue.

The failures are:

grapheme.test
==== grapheme-prev-ucd-659.0 ÷ [1.0] VEDIC SIGN JIHVAMULIYA (ConjunctLinkermExtend) × [9.3] DEVANAGARI LETTER KA (LinkingConsonant) ÷ [2.0] FAILED
==== Contents of test case:
            set text [join $graphemes ""]
            set l {}
            set i end
            while {[set grapheme [grapheme prev $text i]] ne ""} {
                lappend l $grapheme
            }
            lreverse $l
---- Result was:
\u1CF5 \u0915
---- Result should have been (exact matching):
\u1CF5\u0915
==== grapheme-prev-ucd-659.0 FAILED
==== grapheme-prev-ucd-875.0 ÷ [1.0] VEDIC SIGN JIHVAMULIYA (ConjunctLinkermExtend) × [9.3] BENGALI LETTER KA (LinkingConsonant) ÷ [2.0] FAILED
==== Contents of test case:
            set text [join $graphemes ""]
            set l {}
            set i end
            while {[set grapheme [grapheme prev $text i]] ne ""} {
                lappend l $grapheme
            }
            lreverse $l
---- Result was:
\u1CF5 \u0995
---- Result should have been (exact matching):
\u1CF5\u0995
==== grapheme-prev-ucd-875.0 FAILED
==== grapheme-prev-ucd-876.0 ÷ [1.0] VEDIC SIGN UPADHMANIYA (ConjunctLinkermExtend) × [9.3] BENGALI LETTER PA (LinkingConsonant) ÷ [2.0] FAILED
==== Contents of test case:
            set text [join $graphemes ""]
            set l {}
            set i end
            while {[set grapheme [grapheme prev $text i]] ne ""} {
                lappend l $grapheme
            }
            lreverse $l
---- Result was:
\u1CF6 \u09AA
---- Result should have been (exact matching):
\u1CF6\u09AA
==== grapheme-prev-ucd-876.0 FAILED
==== grapheme-prev-ucd-879.0 ÷ [1.0] ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA (ConjunctLinkermExtend) × [9.3] ZANABAZAR SQUARE LETTER KA (LinkingConsonant) ÷ [2.0] FAILED
==== Contents of test case:
            set text [join $graphemes ""]
            set l {}
            set i end
            while {[set grapheme [grapheme prev $text i]] ne ""} {
                lappend l $grapheme
            }
            lreverse $l
---- Result was:
\U00011A3A \U00011A0B
---- Result should have been (exact matching):
\U00011A3A\U00011A0B
==== grapheme-prev-ucd-879.0 FAILED

Tests ended at 2026-08-26 14:39:34 CEST all.tcl: Total 41618 Passed 41614 Skipped 0 Failed 4 Sourced 1 Test Files. Files with failing tests: grapheme.test

Referenced by2
apnadkarnimarkdown2026-08-26 15:18:22

I believe this is same as what was ticketed earlier and being tracked upstream. Already fixed but awaiting Unicode 18.0 release before merge into utf8proc main.

jan.nijtmanswiki2026-08-26 15:40:52

> Already fixed but awaiting Unicode 18.0 release

The PR which should fix this is already in Tk trunk. It helps a lot, the number of failing tests goes down from 16 to only 4. So, upstream it's not fixed 100% yet.

jan.nijtmanswiki2026-10-02 18:56:47

Utf8proc 2.12.0 is released now. Still, those 4 testcases fail.

apnadkarniplain2026-10-04 13:03:51
I should be able to look at this in a week or so. No urgency for 9.1 since it is unsupported in any case and the failures are corner cases that have changed in Unicode 18 vs 17.
apnadkarnimarkdown2026-10-04 17:06:54

I just noticed that all four failures are with moving backward through the string. utf8proc itself does not provide a function to do that and the standard only prescribes the algorithm for moving forward. So the bug is likely in my implementation of the GraphemePrev function. I'll revisit later.

jan.nijtmanswiki2026-10-05 14:48:08

Confirming that the testcases now pass in the "bug-3b2a52-apn" branch.

Thanks!

apnadkarni Closed ticket [3b2a527ed3]. [History diff]2026-10-05 16:41:25
Log in (anonymous is fine) to add a comment.