Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 761df7fbffcc36d8c41ba765130e3fb7d0e2a5da
Ticket: 218438ffffffffffffffffffffffffffffffffff
Control-Z in string generates incorrect error on Windows
User & Date: nobody on 2000-10-26 00:57:36
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 6208 Bug
    Version: 8.3.1
    SubmitDate: '2000-09-05'
    LastModified: '2000-09-05'
    Severity: MED
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Windows 98
    OSVersion: Windows 98
    Machine: Toshiba laptop
    FixedDate: '2000-10-25'
    ClosedDate: '2000-09-05'
    
    
    Name:
    Mace Moneta
    
    Comments:
    This took a very long time to isolate, due to the misleading error
        message, since the actual code for the routine was VERY large.  While
        not a serious problem (it is easily worked around), it is very painful
        to debug.
    
    ReproducibleScript:
    The following script executes correctly on Linux/Uniz, but generates a misleading error on Windows98.  Note that the comparison string contains only a control-Z character ("\032"):
    
    proc {sample} {} {
    
       if {$cmd == "^Z"} {
          set temp_cmd $cmd
       }
    }
    
    puts "hello"
    
    ObservedBehavior:
    On Unix/Linux, the operation is correct:
    
    $ tclsh tcl.bug
    hello
    
    However on Windows98, a misleading error is displayed:
    
    C:\My Documents\TCL>tclsh83 tcl.bug
    missing close-brace
        while executing
    "proc {sample} {}"
        (file "tcl.bug" line 1)
    
    DesiredBehavior:
    I expect the Windows version to execute the same as the Unix version when referencing control characters in quoted strings.
    
    
    
    ^Z has been the EOF char since ages on Windows, and it is VERY IMPORTANT
    TO NOTE that Tcl8.4 extends that fact to Unix/Mac as well by default.
    This enables very interesting apps like Scripted Documents (see TclKit
    by Jean-Claude Wippler), and straightens out the cross-platform
    irregularity.
    
    You can use the "\032" octal encoding more safely, or the alternative
    \u001a unicode encoding style. 
    -- 09/05/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.3.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "37. File System"
  10. title changed to:
    Control-Z in string generates incorrect error on Windows
    
  11. type changed to: "Bug"