Overview
| Artifact ID: | a5247a0e52317a317d636f97f856f0bc7def9b986df1ffecde42ca56c9ee79aa |
|---|---|
| Ticket: | f443140a8547b6f6d70c51a6bbf742e72dca0ca8
connection between Tcl_UtfNext/Tcl_UtfPrev and Tcl_UtfCharComplete() |
| User & Date: | jan.nijtmans on 2020-04-27 16:48:09 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
When hunting for [27944a3661], it has ben apparent that some people expect that Tcl_UtfCharComplete() can be used to protect Tcl_UtfNext() calls for overflowing when the string is not 0-terminated. This has always been true, but not any more with TIP #389. Since such a connection was never documented, no problem: We shouldn't document something that isn't true. However, there is a problem with TIP #542: According to the current documentation of Tcl_UtfPrev: <pre> When \fIsrc\fR is greater than \fIstart\fR, it always returns a pointer less than \fIsrc\fR and greater than or equal to (\fIsrc\fR - \fBTCL_UTF_MAX\fR) </pre> This is not true anymore for Tcl 8.7+. Either change TCL_UTF_MAX to 4 (as they can step over 4 bytes), or make Tcl_UtfNext()/Tcl_UtfPrev() step twice for Characters > 0xFFFF This ticket is meant to expore the second possibility. If it fails we can always change the documentation. If it works, then Tcl_UtfCharComplete() can be used - again - to protect Tcl_UtfNext calls.
- is_private changed to: "0"
- login: "jan.nijtmans"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "jan.nijtmans"
- subsystem changed to: "44. UTF-8 Strings"
- title changed to:
connection between Tcl_UtfNext/Tcl_UtfPrev and Tcl_UtfCharComplete()
- type changed to: "RFE"