Overview
| Artifact ID: | 778d02e89283c2fc8cce5500f804a426209b668eedfe2be91cc368775987b7c4 |
|---|---|
| Ticket: | f443140a8547b6f6d70c51a6bbf742e72dca0ca8
connection between Tcl_UtfNext/Tcl_UtfPrev and Tcl_UtfCharComplete() |
| User & Date: | jan.nijtmans on 2020-04-28 08:29:17 |
Changes
- icomment:
I see what's going on: The current documentation can be interpreted various ways, that should be clarified. For example: <pre> test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev tip389} { testutfprev A\xF0\x90\x80\x80 4 } 3 </pre> So, we have a valid 4-byte UTF-8 sequence. The pointer is on the last byte of it. Currently, the output is "3". Common sense in this case says it should jump to the first byte of the sequence. So, the output should be "1". But ... since - in this branch - we want to make Tcl_UtfPrev() symmetric with Tcl_UtfNext(), it could also make sence to let it jump to the second byte of the sequence so "2". So, Don, would you expect "1" here (jump to the beginning of the sequence) or "2" (jump to the second byte". I'll have to think on that too..... - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"