Skip to content
Tcl Source Code History Of Ticket 1065519
Login

History Of Ticket 1065519

Artifacts Associated With Ticket 1065519

  1. Ticket change [418521a9bf] (rid 116202) by nobody on 2004-11-12 23:54:24:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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]
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "None"
    10. title initialized to: "Backslash substitution bug"
    11. type initialized to: "Bug"
  2. Ticket change [0db9ef8580] (rid 114409) by dgp on 2004-11-13 07:26:22:

    1. resolution changed to: "Invalid"
    2. status changed to: "Closed"
    3. subsystem changed to: "45. Parsing and Eval"
  3. Ticket change [52005b4369] (rid 126233) by dgp on 2004-11-13 07:26:23:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2004-11-13T00:26:23"
    3. closer changed to: "dgp"
    4. foundin changed to: "obsolete: 8.4.7"
    5. 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.
      
      
      
    6. login: "dgp"
    7. mimetype: "text/plain"
    8. username: "dgp"
  4. Ticket change [b10097a10c] (rid 98071) by nobody on 2004-11-13 08:06:50:

    1. 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]
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  5. Ticket change [d3150de9c4] (rid 113633) by maxvelocity on 2004-11-13 08:09:20:

    1. 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.
      
      
    2. login: "maxvelocity"
    3. mimetype: "text/plain"
    4. username: "maxvelocity"
  6. Ticket change [e10482dec7] (rid 87373) by dgp on 2004-11-14 02:50:54:

    1. 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.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"