.
D 2022-12-22T13:15:31.584
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment #\sCreate\sthe\sdata\r\npackage\srequire\sTcl\s9\r\nset\sfd\s[open\s"data.txt"\sw+]\r\nfconfigure\s$fd\s-encoding\sbinary\r\n#\sThis\sis\snot\svalid\sUTF-8\r\nputs\s$fd\sAB\\xc0\\x40CD\\nEFG\r\nclose\s$fd\r\n\r\n#\sNow\stry\sto\sread\sit\swith\s[gets]\r\nset\sfd\s[open\s"data.txt"]\r\nfconfigure\s$fd\s-encoding\sutf-8\s-strictencoding\s1\r\n#\sThat\snext\sline\swill\shang\sindefinitely\r\nset\sdata\s[gets\s$fd]\r\nputs\s"not\sreached"\r\nclose\s$fd\r\nputs\s$data\r\n\r\nI'm\snot\ssure\show\sthis\sis\ssupposed\sto\swork\s\r\nbut\sit\ssurely\sshould\snot\swork\sthis\sway.
J foundin Tcl\s9.0,\strunk
J is_private 0
J login pointsman
J priority 5\sMedium
J private_contact 4ca203a8e925aecdd9419645f936bccf18cd6ea7
J resolution None
J severity Important
J status Open
J submitter pointsman
J subsystem 25.\sChannel\sSystem
J title [gets]\son\s-strictencoding\s1\sconfigured\schannel
J type Bug
K 154ed7ce564a7b4cc39463d643b251969006c247
U pointsman
Z 9826cb53b057a27ebe6b62e3a9dfa81b