Artifacts Associated With Ticket 2834453
Ticket change [39cc249fbc] (rid 112449) by exgerhardr on 2009-08-09 12:57:55:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized 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
- foundin initialized to: "obsolete: 8.5.7"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "exgerhardr"
- subsystem initialized to: "36. Pathname Management"
- title initialized to:
Bug in handling "special" characters in [file] function
- type initialized to: "Bug"
Add attachment "test_bug.tcl" [92b4e4f957] (rid 120819) by exgerhardr on 2009-08-09 19:57:55.
Ticket change [391e203658] (rid 112334) by exgerhardr on 2009-08-09 19:57:56:
- icomment:
File Added - 338509: test_bug.tcl
- login: "exgerhardr"
- mimetype: "text/plain"
- username: "exgerhardr"
- icomment:
Ticket change [e38b5ed8ad] (rid 87816) by exgerhardr on 2009-08-09 20:07:21:
- icomment:
Incorrect reference in 5.: 5. All interpreted special characters are commonly used on Windows, other than on Unix (c-shell style) - see topic 4. should be changed to 5. All interpreted special characters are commonly used on Windows, other than on Unix (c-shell style) - see topic 6.
- login: "exgerhardr"
- mimetype: "text/plain"
- username: "exgerhardr"
- icomment:
Ticket change [23e099ad25] (rid 131010) by dgp on 2009-08-11 00:46:15:
- assignee changed to: "dgp"
- icomment:
I'm deep in another bug at the moment, but then I'll examine this one. Thanks for the report. If you don't see action here in 2 weeks, ping with another comment.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dgp"
Ticket change [2c5e3c81ab] (rid 118891) by dgp on 2009-08-13 01:53:20:
- icomment:
Ok, I'm looking at this now, trying to break up this extremely large and dense report into some tasks that are of a size that can be tackled.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [30e0819b12] (rid 93330) by dgp on 2009-08-13 02:21:27:
- icomment:
The first thing I see are a few more demonstration examples of Bug 2806250.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [b24b092655] (rid 98309) by exgerhardr on 2009-08-13 03:50:14:
- icomment:
Additional comments to "special characters" and tilde expansion: In 8.5.7 $,[,] is interpreted correct but the interaction between tilde is "strange". === 1: File: /net/pub/WinXP/test/~[filename].txt === [file exist $f]-> 0 [file type $f]-> could not read "/net/pub/WinXP/test/~[filename].txt": no such file or directory [file type [file normalize $f]]-> file [file type [subst -nocommands $f]]-> file You see that [subst -nocommands $f] also circumvents the error like [file normalize $f]. Same with the file which begins with "~$": === 0: File: /net/pub/WinXP/test/~$filename.txt === [file exist $f]-> 0 [file type $f]-> could not read "/net/pub/WinXP/test/~$filename.txt": no such file or directory [file type [file normalize $f]]-> file [file type [subst -novariables $f]]-> file Also here [subst -novariables $f] circumvents the error. Tilde expansion only is for "expanding" the beginning of the file and not inside of a file path and in csh also "quoting" is possibe (but not in tclsh). gerhardr@nserver:/net/pub/WinXP/test>csh nserver:/net/pub/WinXP/test> ls ~filename.txt Unknown user: filename.txt. nserver:/net/pub/WinXP/test> ls '~filename.txt' ~filename.txt nserver:/net/pub/WinXP/test> cd .. nserver:/net/pub/WinXP> ls /net/pub/WinXP/test/~filename.txt /net/pub/WinXP/test/~filename.txt
- login: "exgerhardr"
- mimetype: "text/plain"
- username: "exgerhardr"
- icomment:
Ticket change [77221082c4] (rid 105707) by dgp on 2009-08-13 03:53:45:
- icomment:
No. Please don't add more detail here. My task at the moment is breaking it apart, not building it higher.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2db0c11199] (rid 119104) by dgp on 2009-08-13 04:29:17:
- icomment:
Next I see some examples of Bug 2511011.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7b54d287f9] (rid 90498) by dgp on 2009-08-13 04:29:52:
- icomment:
And the rest of the original report adds up to a large sea of things working as expected.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [5663450b91] (rid 94309) by dgp on 2009-08-13 04:43:52:
- icomment:
got another maintainer checking the demo script on Windows in cases there's some surprises there I haven't seen in my linux testing.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e73f780e8c] (rid 104417) by dgp on 2009-08-13 04:48:40:
- icomment:
and today's comment just demos the same two bugs again.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [a3ecf59ac5] (rid 110126) by andreas_kupries on 2009-08-13 04:51:49:
- icomment:
File Added - 338957: OUT.txt
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [6d25cf4599] (rid 128637) by andreas_kupries on 2009-08-13 04:54:44:
- icomment:
File Deleted - 338957:
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [e3298aed33] (rid 87744) by andreas_kupries on 2009-08-13 04:55:16:
- icomment:
File Added - 338958: OUT.txt
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Add attachment "OUT.txt" [fbeb904eb7] (rid 108142) by andreas_kupries on 2009-08-13 04:55:16.
Ticket change [96e6f851d2] (rid 106410) by andreas_kupries on 2009-08-13 04:57:04:
- icomment:
Attached a file OUT.txt with the results of running test_bug.tcl on Windows. Note the file 0 from the setup ('#\!home\!alina\!name#') could not be created, as it contains characters which are not allowed in filenames on that platform. - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [524b593a11] (rid 126292) by dgp on 2009-08-13 22:41:02:
- closedate changed to: "2009-08-13T15:41:02"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 thanks for that output, aku. It shows essentially the same symptoms as on linux. The key difference is that Bug 2806250 appears not to trigger (as much?) on Windows compared to linux. Since all bugs demo'd by the submitted script are already logged, closing this as a Dup.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- username: "dgp"