Skip to content
Tcl Source Code History Of Ticket 539417ffffffffff
Login

History Of Ticket 539417ffffffffff

Artifacts Associated With Ticket 539417ffffffffff

  1. Ticket change [bf8108a37e] (rid 102262) by blacksqr on 2002-04-04 19:45:32:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The command:
      
      % scan - %c
      
      produces a different output than 
      
      % scan \- %c
      
      where "-" originated as hex 96 in cp1252.
      
      Details:
      
      I have a file called longdash.txt on my Windows machine
      which contains a single character, hex 96, which is a
      long dash in the default system encoding cp1252.  I
      read this file into a variable $longdash.  I try
      
      % puts $longdash
      -
      
      ...as expected.  Now I copy and paste the output
      character to get the next command:
      
      % scan - %c
      8211
      
      This is fine, tcl translated the character into its
      preferred encoding when the file was read.  Now I try
      
      % scan \- %c
      255
      
      Huh?
      
      This behavior prevents writing of generalized functions
      that accept a wide range of characters, since it is
      desirable to escape out some characters when feeding
      them to the scan command.  Characters with encodings
      higher than 255 have to be treated as a special case. 
      A backslash should be a guarantee of safety, not a data
      munger.
      
      Steve Huntley
      [email protected]
      
    4. foundin initialized to: "obsolete: 8.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "blacksqr"
    9. subsystem initialized to: "44. UTF-8 Strings"
    10. title initialized to: "backslash causes scan to alter behavior"
    11. type initialized to: "Bug"
  2. Ticket change [a6f450f4fa] (rid 98700) by hobbs on 2002-04-05 08:52:44:

    1. closedate changed to: "2002-04-05T01:52:44"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      The noted chars don't correspond to longdash in cp1252 on 
      my machine, but this sounds like bug 217987, which was 
      fixed in 8.3.4 / 8.4a4.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "hobbs"