Artifacts Associated With Ticket 769812ffffffffffffffffffffffffffffffffff
Ticket change [f67080ea87] (rid 130303) by dgp on 2003-07-11 19:20:52:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Documentation for Tcl_NumUtfChars says: Tcl_NumUtfChars corresponds to strlen for UTF-8 strings. It returns the number of Tcl_UniChars that are represented by the UTF-8 string src. The length of the source string is len bytes. If the length is negative, all bytes up to the first NULL byte are used. However, when length is negative, the routine does not stop at the first NULL byte. It stops after the first UTF sequence that converts to the null character, notably \xC0\x80 So, it seems that Tcl_NumUtfChars("\300\200\000", -1) will return 0, when it should return 1. It appears that changing line 506 of revision 1.31 of generic/tclUtf.c from if (ch == '\0') { to if (str[-1] == '\0') { would correct the error. - foundin initialized to: "obsolete: 8.4.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "44. UTF-8 Strings"
- title initialized to: "Tcl_NumUtfChars not as documented"
- type initialized to: "Bug"
Ticket change [4751be0998] (rid 99679) by dgp on 2003-07-12 04:43:34:
- assignee changed to: "hobbs"
Ticket change [7f78743007] (rid 97566) by hobbs on 2003-07-17 07:23:13:
- icomment:
Logged In: YES user_id=72656 are there any tests for this?
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [38db16a6de] (rid 112285) by dgp on 2003-07-17 12:10:13:
- icomment:
Logged In: YES user_id=80530 The example in the report is a demo of the bug. If you're looking for something at the script level, try: package require Tk pack [message .m -text a\u0000b] before fixing the bug, only the character "a" will be displayed. After the bug fix, all three characters are displayed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0d655d56f9] (rid 114352) by dgp on 2003-10-03 05:29:21:
- assignee changed to: "dkf"
- priority changed to: "8"
Ticket change [21ecfc9759] (rid 130664) by dkf on 2003-10-03 17:15:13:
- priority changed to: "9 Immediate"
Ticket change [db916e4ef6] (rid 107986) by dkf on 2003-10-08 20:55:35:
- icomment:
Logged In: YES user_id=79902 Nothing in the Tcl core exhibits the problem; all uses of Tcl_NumUtfChars also supply the length. Will need to add some extra code to tclTest.c to check this...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [3a61f4ef48] (rid 112557) by dkf on 2003-10-08 21:28:09:
- status changed to: "Closed"
Ticket change [d69da8cb1d] (rid 123838) by dkf on 2003-10-08 21:28:10:
- icomment:
Logged In: YES user_id=79902 testing for and fixed in head and 8.4 branch
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "dkf"
- icomment:
Ticket change [2c4e0c863f] (rid 118878) by dkf on 2003-10-08 21:28:11:
- closedate changed to: "2003-10-08T14:28:11"
- closer changed to: "dkf"