Skip to content
Tcl Source Code History Of Ticket dc23c64193
Login

History Of Ticket dc23c64193

Artifacts Associated With Ticket dc23c64193

  1. Ticket change [b5517f5a57] (rid 212095) by pooryorick on 2023-04-08 11:26:50:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Given the following script,
      
      <blockquote><code><verbatim>
      set chan [file tempfile]
      chan configure $chan -translation binary -profile strict
      puts -nonewline $chan hello\xc0there
      chan configure $chan -encoding utf-8 -profile strict
      seek $chan 0
      catch {read $chan} errmsg
      chan tell $chan ;# -> 5
      </verbatim></code></blockquote>
      
      
      , there is an invalid utf-8 sequence starting at position 5. <code>read</code>
      produces an error and <code>chan tell</code> report that the current position
      in the file has advanced to byte <code>5</code>.  Because the position has
      advanced, if the channel is not seekable, there is no way to adjust the channel
      configuration and try again.
      
      On such a failure, either the position in the file should remain what it was
      before the unsuccessful read, or the result up to byte 5 should be made
      available to the caller.
      
    5. is_private initialized to: "0"
    6. login: "pooryorick"
    7. priority initialized to: "5 Medium"
    8. private_contact initialized to: "2b2275eab1118e1fab0016cf1c5702893c6af86c"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "pooryorick"
    13. subsystem initialized to: "- New Builtin Commands"
    14. title initialized to:
      [read] fails, on encoding error, but current position advances anyway.
      
    15. type initialized to: "Bug"
  2. Ticket change [b0605234b2] (rid 212096) by pooryorick on 2023-04-08 11:27:02:

    1. login: "pooryorick"
    2. mimetype: "text/plain"
    3. severity changed to: "Important"
  3. Ticket change [d4f8cc9302] (rid 212097) by pooryorick on 2023-04-08 11:27:22:

    1. comment changed to:
      Given the following script,
      
      <blockquote><code><verbatim>
      set chan [file tempfile]
      chan configure $chan -translation binary -profile strict
      puts -nonewline $chan hello\xc0world
      chan configure $chan -encoding utf-8 -profile strict
      seek $chan 0
      catch {read $chan} errmsg
      chan tell $chan ;# -> 5
      </verbatim></code></blockquote>
      
      
      , there is an invalid utf-8 sequence starting at position 5. <code>read</code>
      produces an error and <code>chan tell</code> report that the current position
      in the file has advanced to byte <code>5</code>.  Because the position has
      advanced, if the channel is not seekable, there is no way to adjust the channel
      configuration and try again.
      
      On such a failure, either the position in the file should remain what it was
      before the unsuccessful read, or the result up to byte 5 should be made
      available to the caller.
      
    2. login: "pooryorick"
    3. mimetype: "text/plain"