Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 39cc249fbce4ea52fbfd06fe592175b4cc06947d
Ticket: 2834453fffffffffffffffffffffffffffffffff
Bug in handling "special" characters in [file] function
User & Date: exgerhardr on 2009-08-09 12:57:55
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl version: 8.5.7, also tested on 8.5.4, 8.5.5 with different behaviour
    OS plattforms: Linux (ia32, amd64), Windows XP Professional
    Problem Behaviour:
     1. Depending on Tcl-version the "special" characters ($,[,],\,~) are interpreted different and incorrect.
     2. Incorrect interpretation of "~" character, only meaningfull at beginning of a filename not on full path or inside of a filename. 
     3. Interpretation of "$,[,],\" in file and pathnames (violation of tcl 8.5 interpretation rule [11] Order of substitution).
     4. Using [file normalize] on files before [file ...] changes the behaviour (makes file "accessible" in 8.5.7, not in 8.5.4).
     5. All interpreted special characters are commonly used on Windows, other than on Unix (c-shell style) - see topic 4.
     6. File normalize is not possible on relative pathnames if name begins with "~" (correct according documented tilde interpretation).
    
    Expected Behaviour:  
     1,3. Disabling influence of special characters "$,[,],\" in file command.
     2. Correct interpretation of "~" character (only at beginning of a filename). 
     4. Clean up  [file normalize] handling (EIAS violation).
     5,6. Add a new option which allows to ignore any interpretation, proposal: -nosubst.
    
    Example: attached tcl test-script
    Necessary environment for attached test script is a directory including 8 specific filenames:
    
    *** File name list of dir /net/pub/WinXP/test
    0: #\!home\!alina\!name#
    1: $[filename].txt
    2: $filename.txt
    3: [filename].txt
    4: filename[1].txt
    5: file~name.txt
    5: ./~$filename.txt
    6: ./~[filename].txt
    7: ./~filename.txt
    
  4. foundin changed to: "obsolete: 8.5.7"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "exgerhardr"
  10. subsystem changed to: "36. Pathname Management"
  11. title changed to:
    Bug in handling "special" characters in [file] function
    
  12. type changed to: "Bug"