Overview
| Artifact ID: | 08ca84a85267de586b1dedd341939e7b68ed0cbb54d5a45f9a63d5fac789e50c |
|---|---|
| Ticket: | eabcbd08274f2d22351fa96d972e4abfd08a8329
[read] error persists on channel with strict encoding after encoding is changed to binary |
| User & Date: | pooryorick on 2023-04-16 23:02:06 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
In the script below, after the first [read] returns an encoding error, the channel is reconfiguredi to <code>-encoding iso8859-1</code>, and the subsequent [read] should return character <code>\x81</code>, but instead it repeats the error: <blockquote><code><verbatim> set res {} set chan [file tempfile] fconfigure $chan -encoding binary # \x81 is invalid in utf-8. -eofchar is not detected, because it comes later. puts -nonewline $chan A\x81\x1A flush $chan seek $chan 0 fconfigure $chan -encoding utf-8 -buffering none -eofchar \x1A \ -translation lf -profile strict catch {read $chan} cres puts $cres ;#-> error reading "file*": invalid or incomplete multibyte or wide character puts [list eof [eof $chan]] ;#-> eof 1 puts [list position [tell $chan]] ;#-> position 1 chan configure $chan -encoding iso8859-1 catch {read $chan} cres puts $cres] ;#-> error reading "file*": invalid or incomplete multibyte or wide character </verbatim></code></blockquote> - is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- private_contact changed to: "2b2275eab1118e1fab0016cf1c5702893c6af86c"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "- New Builtin Commands"
- title changed to:
[read] error persists on channel with strict encoding after encoding is changed to binary
- type changed to: "Bug"