Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e15c823b87d298534e7ecf2dc06a3212d9d8e182
Ticket: 218403ffffffffffffffffffffffffffffffffff
-translation binary misinterpreted as -transation lf
User & Date: nobody on 2000-10-26 00:57:09
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 5296 Bug
    Version: 8.3
    SubmitDate: '2000-04-28'
    LastModified: '2000-05-08'
    Severity: SER
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Solaris
    FixedDate: '2000-10-25'
    ClosedDate: '2000-05-08'
    
    
    Name:
    Donal Fellows
    
    Comments:
    The only user-level work-around is to manipulate the data at the C
        level, which stinks big-time.
    
    ReproducibleScript:
    set f [open [info nameofexecutable] r] ;# Could be any file
    puts [fconfigure $f -translation]
    fconfigure $f -translation binary -encoding binary
    puts [fconfigure $f -translation]
    close $f
    
    ObservedBehavior:
    The above script outputs the following:
      auto
      lf
    Thus, putting the channel into binary mode has in fact made it switch into changing all CRLF sequences in the data into single LFs.  This is a great way to corrupt data being read from a binary file (I found this when trying to write a PNG file reader) and is _utterly_ wrong...
    
    DesiredBehavior:
    It should output:
      auto
      binary
    And having set the encoding and translation to binary for a channel, I should just get the bytes that are being passed along that channel.
    
    
    
    This is actually correct, although confusing.  The point of
    translation is that it tells us what we are converting externally
    into the internal linefeed char (which is LF).  With -binary,
    this means only lf == LF, which is the correct noop to give us
    binary translation. 
    -- 05/08/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.3"
  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: "62. (unused)"
  10. title changed to:
    -translation binary misinterpreted as -transation lf
    
  11. type changed to: "Bug"