Artifacts Associated With Ticket 4c5a98
Ticket change [973cabdbd3] (rid 258309) by serhiy.storchaka on 2026-10-16 21:38:18:
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
With <nowiki>-translation auto</nowiki>, if a read ends with "\r" and the next read has no end of line, a "\n" at the start of a later read is dropped as if it were the LF of a CRLF pair: <verbatim> lassign [chan pipe] r w fconfigure $r -blocking 0 -translation auto fconfigure $w -translation binary -buffering none puts -nonewline $w "a\r"; gets $r ;# a puts -nonewline $w "b"; gets $r ;# (blocked) puts -nonewline $w "\nc\n"; gets $r ;# bc (8.6.12: b, then c) </verbatim> LF CR input loses empty lines in the same way. Since [a3ed092aab] (8.6.13, the fix for [b3977d199b]) Tcl_GetsObj() resets INPUT_SAW_CR only when an end of line is found.
- foundin initialized to: "8.6.18, 9.0.5, 9.1.0"
- login: "serhiy.storchaka"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "serhiy.storchaka"
- subsystem initialized to: "25. Channel System"
- title initialized to:
gets with -translation auto merges lines after a "\r" at the end of a read
- type initialized to: "Bug"
Ticket change [104c2074aa] (rid 258314) by serhiy.storchaka on 2026-10-16 21:40:49:
- icomment:
Proposed fix in branch [/timeline?r=gets-auto-saw-cr|gets-auto-saw-cr]: Tcl_GetsObj() resets INPUT_SAW_CR as soon as data follows the "\r" and sets it again if the skipped "\n" is pushed back, so the torn CRLF case of [b3977d199b] still works (io-29.36.1, io-29.36.2). Test io-29.36.3.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [6bad4e2b7b] (rid 262030) by jan.nijtmans on 2026-11-22 22:56:47:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2461367.4561011572"
- closer changed to: "jan.nijtmans"
- comment changed to:
With <nowiki>-translation auto</nowiki>, if a read ends with "\r" and the next read has no end of line, a "\n" at the start of a later read is dropped as if it were the LF of a CRLF pair: <verbatim> lassign [chan pipe] r w fconfigure $r -blocking 0 -translation auto fconfigure $w -translation binary -buffering none puts -nonewline $w "a\r"; gets $r ;# a puts -nonewline $w "b"; gets $r ;# (blocked) puts -nonewline $w "\nc\n"; gets $r ;# bc (8.6.12: b, then c) </verbatim> LF CR input loses empty lines in the same way. Since [a3ed092aab] (8.6.13, the fix for [b3977d199b]) Tcl_GetsObj() resets INPUT_SAW_CR only when an end of line is found.
- icomment:
Merged to [1bcbef3166|trunk], core-9-0-branch and core-8-6-branch Many thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"