Artifacts Associated With Ticket 218524ffffffffff
Ticket change [5d426133cc] (rid 115431) by nobody on 2000-10-26 01:01:40:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 887 Bug Version: 8.1a2 SubmitDate: '1998-12-02' LastModified: '1999-11-04' Severity: CRIT Status: Released Submitter: admin ChangedBy: hershey OS: All OSVersion: NA Machine: NA FixedDate: '1999-11-04' FixedInVersion: 8.1b1 ClosedDate: '2000-10-25' I have discovered the following problem in both tcl8.1a2 and the net distribution of tcl8.1. Basically, if you write out more than 4096 bytes of data that has carriage returns in it to a channel which has been fconfigured to have translation crlf, it will change every 4096th character to a carriage return. Syd Polk The following script illustrates the problem: # Test 1 - Case that works set bigstring {} for {set i 0} {$i < 10000} {incr i} { append bigstring "0" } set f [open foo.out w] fconfigure $f -translation crlf puts $f $bigstring nonewline close $f set f [open foo.out] fconfigure $f -translation crlf set readstring [read $f] close $f catch {file delete -force foo.out} if {[string compare $bigstring $readstring] != 0} { puts "Test 1 did not work" } # Test 2 - Fails set bigstring {} for {set i 0} {$i < 10000} {incr i} { append bigstring "000000000\n" } set f [open foo.out w] fconfigure $f -translation crlf puts $f $bigstring nonewline close $f set f [open foo.out] fconfigure $f -translation crlf set readstring [read $f] close $f catch {file delete -force foo.out} if {[string compare $bigstring $readstring] != 0} { puts "Test 2 did not work" } Fixed... -- 11/04/1999 hershey - foundin initialized to: "obsolete: 8.1a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "57. zlib"
- title initialized to: "every 4096th char is changed to a carriage return"
- type initialized to: "Bug"
Ticket change [31b5d81b3c] (rid 93479) by welch on 2000-10-26 08:23:19:
- closedate changed to: "2000-10-26T01:23:19"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [9777f0d21c] (rid 106494) by dgp on 2001-04-06 03:24:04:
- closedate changed to: "2001-04-05T20:24:04"
- closer changed to: "dgp"
- subsystem changed to: "25. Channel System"