Skip to content
Tcl Source Code Artifact [973cabdbd3]
Login

Artifact [973cabdbd3]

Artifact 973cabdbd387fdcaf1f25efd32aad88fe7feae87d1f1b0cf3b4a8873f75ef951:

Ticket change [973cabdbd3] - New ticket [4c5a98f5a0d4ae30|4c5a98f5a0] <i>gets with -translation auto merges lines after a &quot;\r&quot; at the end of a read</i>. by serhiy.storchaka on 2026-10-16 21:38:18.
D 2026-10-16T21:38:18.666
J cmimetype text/x-fossil-wiki
J comment With\s<nowiki>-translation\sauto</nowiki>,\sif\sa\sread\sends\swith\s"\\r"\sand\sthe\snext\sread\shas\sno\send\sof\sline,\sa\s"\\n"\sat\sthe\sstart\sof\sa\slater\sread\sis\sdropped\sas\sif\sit\swere\sthe\sLF\sof\sa\sCRLF\spair:\n\n<verbatim>\nlassign\s[chan\spipe]\sr\sw\nfconfigure\s$r\s-blocking\s0\s-translation\sauto\nfconfigure\s$w\s-translation\sbinary\s-buffering\snone\nputs\s-nonewline\s$w\s"a\\r";\sgets\s$r\s\s\s\s\s\s;#\sa\nputs\s-nonewline\s$w\s"b";\sgets\s$r\s\s\s\s\s\s\s\s;#\s(blocked)\nputs\s-nonewline\s$w\s"\\nc\\n";\sgets\s$r\s\s\s\s;#\sbc\s\s(8.6.12:\sb,\sthen\sc)\n</verbatim>\n\nLF\sCR\sinput\sloses\sempty\slines\sin\sthe\ssame\sway.\sSince\s[a3ed092aab]\s(8.6.13,\sthe\sfix\sfor\s[b3977d199b])\sTcl_GetsObj()\sresets\sINPUT_SAW_CR\sonly\swhen\san\send\sof\sline\sis\sfound.
J foundin 8.6.18,\s9.0.5,\s9.1.0
J login serhiy.storchaka
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter serhiy.storchaka
J subsystem 25.\sChannel\sSystem
J title gets\swith\s-translation\sauto\smerges\slines\safter\sa\s"\\r"\sat\sthe\send\sof\sa\sread
J type Bug
K 4c5a98f5a0d4ae30a0f1bb4d76592f3ba3551bd1
U serhiy.storchaka
Z 23dec37b6daf444d3a2b2ab29805e1e6