Skip to content
Tcl Source Code History Of Ticket 219289
Login

History Of Ticket 219289

Artifacts Associated With Ticket 219289

  1. Ticket change [1f1aec943c] (rid 91087) by nobody on 2000-10-26 05:10:04:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2129 Bug
      Version: 8.1
      SubmitDate: '1999-05-26'
      LastModified: '1999-10-21'
      Severity: MED
      Status: UnAssn
      Submitter: pat
      ChangedBy: hobbs
      RelatedBugIDs: 2128
      OS: Other
      Machine: NA
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Victor Wagner
      
      ReproducibleScript:
      tclsh8.1 >testfile <<!
          fconfigure stdout -encoding unicode
          puts "\uFEFFSome stuff
          !
          dd if=testfile of=testin conv=swab
          tclsh8.1 <<!
          set f [open testin]
          fconfigure \$f -encoding unicode
          fconfigure stdout -encoding [encoding system]
          puts [read \$f]
          !
      
      ObservedBehavior:
      When reading utf-16 file Tcl doesn't recongize byte order
          automatically.
          According to utf-16 specification, each unicode text file should
          contain
          "\uFEFF" as first character, which allows to determine byte order
          automatically.
          But Tcl doesn't pay attention to this characher. So, if proper UTF-16
          file is constructed on MSB-first machine and then read by Tcl on
          LSB-first
          machine of vice versa, it doesn't read properly. On contrary, MS-Word 97
          read
          such files without problems (at least ones with less than 256 chars)
      
      DesiredBehavior:
      When reading unicode files, tcl should pay attention to firsh characher
          and if it is FFFE, switch to opposite byte order.
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.1"
    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: "Tcl doesn't read utf-16 files properly"
    11. type initialized to: "Bug"
  2. Ticket change [9911dd0a1b] (rid 110722) by dgp on 2001-04-06 03:08:14:

    1. subsystem changed to: "10. Objects"
  3. Ticket change [9dc2af9cda] (rid 96366) by dkf on 2001-10-07 18:50:14:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      This is not straight-forward to fix, since the BOM should only be read at the start of the file (this gets 
      awkward when working with files that are in several encodings.) Perhaps it needs some special kind of 
      encoding or a state-flag in the channel structure? (Of course, the encoding system does not know about 
      channels at all. Maybe the decision needs to be made there?)
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  4. Ticket change [19dc1cc50b] (rid 122865) by andreas_kupries on 2001-10-09 22:16:26:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Also note that there are channels like pipes and sockets 
      which might use utf-16 but have no 'start of file' concept
      per se.
      
      IMHO this is a problem to be handled by the application and 
      not the interpreter.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  5. Ticket change [f82da81744] (rid 91497) by hobbs on 2001-10-10 05:21:17:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      The user noted MS Word as an example, and this really is a 
      feature for the application, not the language.  The 
      developer should test for \uFEFF or \uFFEF, but Tcl does 
      need to provide a way to handle utf-16 in MSB or LSB order 
      (either as two absolute encodings, or some option).
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "3 Low"
    5. username: "hobbs"
  6. Ticket change [2a9e260591] (rid 118611) by dgp on 2006-06-21 03:36:47:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      See 1165752
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"