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

History Of Ticket 218524ffffffffff

Artifacts Associated With Ticket 218524ffffffffff

  1. Ticket change [5d426133cc] (rid 115431) by nobody on 2000-10-26 01:01:40:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
    4. foundin initialized to: "obsolete: 8.1a2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "57. zlib"
    10. title initialized to: "every 4096th char is changed to a carriage return"
    11. type initialized to: "Bug"
  2. Ticket change [31b5d81b3c] (rid 93479) by welch on 2000-10-26 08:23:19:

    1. closedate changed to: "2000-10-26T01:23:19"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [9777f0d21c] (rid 106494) by dgp on 2001-04-06 03:24:04:

    1. closedate changed to: "2001-04-05T20:24:04"
    2. closer changed to: "dgp"
    3. subsystem changed to: "25. Channel System"