Overview
| Artifact ID: | b0ba8ed53145842add6bc4514db6f641e2a0b82231d0ee78dcc671d14b3c1dfd |
|---|---|
| Ticket: | c61818e4c9b710bdf9f947c1a40563aeab85357a
Tcl_UtfPrev flaws |
| User & Date: | sebres on 2020-04-08 18:37:50 |
Changes
- icomment:
The question may be rather whether Tcl_UtfNext and Tcl_UtfPrev are precise inverses of each other if we'd exclude "artificial" cases of starting from the mid-character...<br/> For example what is the middle by some "broken" (not valid, surrogate) utf-8 sequence, but enclosed between two correct single byte ascii-chars...<br/> Sure it is not really normal case, but at least one would expect if <code>Next(Next)</code> reaches the right boundary, that the <code>Prev(Prev)</code> starting from there would reach the left boundary (no matter how many nested calls needed, it is always the same count forwards and backwards). If it is not guaranteed - it may be (or rather should be) considered as a bug. Therefore in such precedence question I'm for consistency over backwards compatibility.
- login: "sebres"
- mimetype: "text/x-fossil-wiki"