Artifacts Associated With Ticket a7a89d422a4f5dd3
Ticket change [95a0384550] (rid 212911) by pooryorick on 2023-04-14 18:25:42:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized 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>
- is_private initialized to: "0"
- login: "pooryorick"
- priority initialized to: "5 Medium"
- private_contact initialized to: "2b2275eab1118e1fab0016cf1c5702893c6af86c"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "pooryorick"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to:
Under strict encoding, [gets] returns an error instead of returning the second line
- type initialized to: "Bug"
Ticket change [5b53efe494] (rid 212925) by pooryorick on 2023-04-15 11:57:23:
- assignee changed to: "pooryorick"
- icomment:
Fixed in [d481d08ed9]. This commit also ensures that position in file does not change when <code>gets</code> returns an error.
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Pending"
Ticket change [1a85560c66] (rid 213003) by jan.nijtmans on 2023-04-16 09:31:31:
- icomment:
This change broke the build on Windows, see: [https://github.com/tcltk/tcl/actions/runs/4706656812/jobs/8348035149] 2nd remark: Tcl 8.7 has "-profile strict" too, so this should be backported to 8.7 too. Even better: you should develop the fix on 8.7 and forward-merge to 9.0 then.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "None"
- status changed to: "Open"
- icomment:
Ticket change [0704959a8c] (rid 213012) by pooryorick on 2023-04-16 13:14:12:
- icomment:
I believe commit [7015a9d04911e483] fixes the issue with 75.14 on Windows.
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [bb0c9f2ff9] (rid 213117) by pooryorick on 2023-04-16 23:24:54:
- icomment:
I am opposed to the release of Tcl 8.7 because it has a different alphabet for string values than Tcl 9 does, and releasing it will do more harm than good. Therefore I'm unlikely to spend much time maintaining it. I'd rather see it die an immediate death.
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [da30571786] (rid 213174) by apnadkarni on 2023-04-18 02:52:46:
- icomment:
As of commit [] on trunk, io-75.{14,15} are still failing on Windows. ``` ==== io-75.14 [gets] succesfully returns lines prior to error invalid utf-8 encoding [gets] continues in non-strict mode after error FAILED ==== Contents of test case: lappend res [gets $chan] lappend res [gets $chan] set status [catch {gets $chan} cres copts] lappend res $status $cres chan configure $chan -profile tcl8 lappend res [gets $chan] lappend res [gets $chan] close $chan return $res ---- Result was: {a\x0D} {b\x0D} 1 {error reading "file1a8aec7b500": invalid or incomplete multibyte or wide character} {c\xC0\x0D} {d\x0D} ---- Result should have been (glob matching): a b 1 {error reading "*": invalid or incomplete multibyte or wide character} c\xC0 d ==== io-75.14 FAILED ==== io-75.15 invalid utf-8 encoding strict gets does not hang gets succeeds for the first two lines FAILED ==== Contents of test case: #Now try to read it with [gets] fconfigure $chan -encoding utf-8 -profile strict lappend res [gets $chan] lappend res [gets $chan] set status [catch {gets $chan} cres copts] lappend res $status $cres set status [catch {gets $chan} cres copts] lappend res $status $cres chan configure $chan -translation binary set data [read $chan 4] foreach char [split $data {}] { scan $char %c ord lappend res [format %x $ord] } fconfigure $chan -encoding utf-8 -profile strict lappend res [gets $chan] lappend res [gets $chan] return $res ---- Result was: hello AB 1 {error reading "file1a8aecf4570": invalid or incomplete multibyte or wide character} 1 {error reading "file1a8aecf4570": invalid or incomplete multibyte or wide character} 43 44 c0 40 {EF\x0D} {GHI\x0D} ---- Result should have been (glob matching): hello AB 1 {error reading "*": invalid or incomplete multibyte or wide character} 1 {error reading "*": invalid or incomplete multibyte or wide character} 43 44 c0 40 EF GHI ==== io-75.15 FAILED ``` - login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [dbf90cb72e] (rid 213175) by apnadkarni on 2023-04-18 02:53:42:
- icomment:
Oops, last comment commit should link should have been [5995ca9b6c]
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- icomment:
Ticket change [8803f06fe5] (rid 213181) by apnadkarni on 2023-04-18 05:20:19:
- icomment: "Fixed, I think, by [079d2d5162]. Please review."
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
Ticket change [ef144bfe75] (rid 213182) by jan.nijtmans on 2023-04-18 06:14:27:
- icomment:
> @pouryorick wrote: <pre> I am opposed to the release of Tcl 8.7 ... </pre> Well, I'm opposed to the release of Tcl 9.0 while it still contains testcase failures .... ;-) (So, many thanks, @ashok!)
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [a5634f9359] (rid 213305) by pooryorick on 2023-04-19 07:14:31:
- login: "pooryorick"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
Ticket change [89ad33fccb] (rid 213306) by pooryorick on 2023-04-19 07:15:28:
- login: "pooryorick"
- mimetype: "text/plain"
Ticket change [a629dee7d2] (rid 213602) by pooryorick on 2023-04-21 23:04:00:
- closedate changed to: "2460056.46111983"
- closer changed to: "pooryorick"
- login: "pooryorick"
- mimetype: "text/plain"
- status changed to: "Closed"