Artifact
95a0384550cfd7105b9b46221d42025b3a9fbd66d9c5e5ebe89f916cd9664c16:
Ticket change
[95a0384550]
- New ticket
[a7a89d422a4f5dd3|a7a89d422a] <i>Under strict encoding, [gets] returns an error instead of returning the second line</i>.
by
pooryorick on
2023-04-14 18:25:42.
D 2023-04-14T18:25:42.454
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment In\sthe\sfollowing\sscript,\sthe\sthird\sline\sof\sdata\sin\sthe\schannel\scontains\sa\sbyte\r\nsequence\sthat\sis\snot\svalid\sutf-8.\s\s[gets]\sshould\ssuccessfully\sreturn\stwo\slines\r\nbefore\sreturning\san\serror,\sbut\sit\sreturns\san\serror\sinstead\sof\sreturning\sthe\r\nsecond\sline:\r\n\r\n<blockquote><code><verbatim>\r\nset\schan\s[file\stempfile]\r\nchan\sconfigure\s$chan\s-translation\sbinary\r\n#\sThis\sis\snot\svalid\sUTF-8\r\nputs\s$chan\shello\\nAB\\nCD\\xc0\\x40EF\\nGHI\r\nflush\s$chan\r\nseek\s$chan\s0\r\n\r\nchan\sconfigure\s$chan\s-encoding\sutf-8\s-profile\sstrict\r\ngets\s$chan\r\ngets\s$chan\r\n</verbatim></code></blockquote>
J is_private 0
J login pooryorick
J priority 5\sMedium
J private_contact 2b2275eab1118e1fab0016cf1c5702893c6af86c
J resolution None
J severity Important
J status Open
J submitter pooryorick
J subsystem -\sNew\sBuiltin\sCommands
J title Under\sstrict\sencoding,\s[gets]\sreturns\san\serror\sinstead\sof\sreturning\sthe\ssecond\sline
J type Bug
K a7a89d422a4f5dd372e61a75acf5381142dde80f
U pooryorick
Z 5f648d269572c7ba57cc0c10c90ddf63