Overview
| Artifact ID: | a437cb45d4c96bd8f6e252ed5d52bce169cec1018d982d9df15720145c45562f |
|---|---|
| Ticket: | f443140a8547b6f6d70c51a6bbf742e72dca0ca8
connection between Tcl_UtfNext/Tcl_UtfPrev and Tcl_UtfCharComplete() |
| User & Date: | jan.nijtmans on 2020-04-28 10:15:38 |
Changes
- icomment:
Thinking about it, Tcl_UtfPrev() should - whenever possible do to other restrictions - return a pointer to the first byte of the sequence. If TCL_UTF_MAX=3 and Tcl_UtfPrev() encounters 3 trail-bytes, we have the restriction that Tcl_UtfPrev() cannot jump more that TCL_UTF_MAX bytes. So, then it will jump TCL_UTF_MAX bytes, and another call to Tcl_UtfPrev() will be needed to get in sync with the byte sequence again. Something like that should be documented. Well, accepting the (possible) description above, there are 10 test-cases violating that. Those are: * utf-7.10.0 * utf-7.10.2 * utf-7.10.4 * utf-7.15.0 * utf-7.15.2 * utf-7.15.4 * utf-7.40.0 * utf-7.41.0 * utf-7.48.2 * utf-7.48.4 All of those involve valid 4-byte sequences where the pointer is not on a character border. So, still work to do to fix this.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"