Artifacts Associated With Ticket 1065519
Ticket change [418521a9bf] (rid 116202) by nobody on 2004-11-12 23:54:24:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl Version - Both 8.3 and 8.4 OS Platform and Version - Win XP, Solaris Problem Using backslash substitutions for hex characters doesn't stop at 2 characters Using a string2Hex Routine found on the TCLers wiki page set xxx "ABC\x1C1.00" 0000000: 4142 43C1 2e30 30 ABC..00 I would expect 0000000: 4142 431c 312e 3030 ABC.1.00 My email is [email protected]
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "None"
- title initialized to: "Backslash substitution bug"
- type initialized to: "Bug"
Ticket change [0db9ef8580] (rid 114409) by dgp on 2004-11-13 07:26:22:
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "45. Parsing and Eval"
Ticket change [52005b4369] (rid 126233) by dgp on 2004-11-13 07:26:23:
- assignee changed to: "dgp"
- closedate changed to: "2004-11-13T00:26:23"
- closer changed to: "dgp"
- foundin changed to: "obsolete: 8.4.7"
- icomment:
Logged In: YES user_id=80530 that's the documented rule for backslash substitution. \x will keep reading bytes as long as it sees hexadecimal digits. When done scanning, the final two hexadigits become the value to substitute. You will probably be happier making use of \u substitution instead of \x subtitution for the sake of more predictable behavior.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [b10097a10c] (rid 98071) by nobody on 2004-11-13 08:06:50:
- icomment:
Logged In: NO Thanks for the quick response!!! I am very curious as to the background behind this. Both C and perl work as I would expect. What possible reasons would you want to discard data during a substition. For various reasons, unicode substition is not an option here, but I do have a work around. [email protected]
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [d3150de9c4] (rid 113633) by maxvelocity on 2004-11-13 08:09:20:
- icomment:
Logged In: YES user_id=1158291 I'm curious as why this rule is in place. ANSI C and Perl interpret the backslash substitution for hex with only 2 characters. \u is fine but requires the "1" following the "\x1C" to be converted to hex for a 16-bit value.
- login: "maxvelocity"
- mimetype: "text/plain"
- username: "maxvelocity"
- icomment:
Ticket change [e10482dec7] (rid 87373) by dgp on 2004-11-14 02:50:54:
- icomment:
Logged In: YES user_id=80530 The people currently maintaining Tcl are mostly not those who originally implemented it, so we have a difficult time answering the "why" questions. All we can say is it's been that way a long time; it's documented to be that way; and there exist scripts that depend on it, so we don't dare change it while claiming compatible operations, that is, while distributing the Tcl 8.* series of releases. It's conceivable this could be changed when work toward Tcl 9 takes place. If you are interested in pushing for that, you might file a Feature Request report. BTW, I think you may have misunderstood the \u recommendataion. Wherever you currently have \xHH you can replace it with \u00HH and get the result you expect.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: