Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 95a0384550cfd7105b9b46221d42025b3a9fbd66d9c5e5ebe89f916cd9664c16
Ticket: a7a89d422a4f5dd372e61a75acf5381142dde80f
Under strict encoding, [gets] returns an error instead of returning the second line
User & Date: pooryorick on 2023-04-14 18:25:42
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    In the following script, the third line of data in the channel contains a byte
    sequence that is not valid utf-8.  [gets] should successfully return two lines
    before returning an error, but it returns an error instead of returning the
    second line:
    
    <blockquote><code><verbatim>
    set chan [file tempfile]
    chan configure $chan -translation binary
    # This is not valid UTF-8
    puts $chan hello\nAB\nCD\xc0\x40EF\nGHI
    flush $chan
    seek $chan 0
    
    chan configure $chan -encoding utf-8 -profile strict
    gets $chan
    gets $chan
    </verbatim></code></blockquote>
    
  5. is_private changed to: "0"
  6. login: "pooryorick"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "2b2275eab1118e1fab0016cf1c5702893c6af86c"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "pooryorick"
  13. subsystem changed to: "- New Builtin Commands"
  14. title changed to:
    Under strict encoding, [gets] returns an error instead of returning the second line
    
  15. type changed to: "Bug"