Skip to content
Tcl Source Code Artifact [08ca84a852]
Login

Artifact [08ca84a852]

Artifact 08ca84a85267de586b1dedd341939e7b68ed0cbb54d5a45f9a63d5fac789e50c:

Ticket change [08ca84a852] - New ticket [eabcbd08274f2d22|eabcbd0827] <i>[read] error persists on channel with strict encoding after encoding is changed to binary</i>. by pooryorick on 2023-04-16 23:02:06.
D 2023-04-16T23:02:06.810
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment In\sthe\sscript\sbelow,\safter\sthe\sfirst\s[read]\sreturns\san\sencoding\serror,\sthe\r\nchannel\sis\sreconfiguredi\sto\s<code>-encoding\siso8859-1</code>,\sand\sthe\r\nsubsequent\s[read]\sshould\sreturn\scharacter\s<code>\\x81</code>,\sbut\sinstead\sit\r\nrepeats\sthe\serror:\r\n\r\n<blockquote><code><verbatim>\r\nset\sres\s{}\r\nset\schan\s[file\stempfile]\r\nfconfigure\s$chan\s-encoding\sbinary\r\n#\s\\x81\sis\sinvalid\sin\sutf-8.\s-eofchar\sis\snot\sdetected,\sbecause\sit\scomes\slater.\r\nputs\s-nonewline\s$chan\sA\\x81\\x1A\r\nflush\s$chan\r\nseek\s$chan\s0\r\nfconfigure\s$chan\s-encoding\sutf-8\s-buffering\snone\s-eofchar\s\\x1A\s\\\r\n-translation\slf\s-profile\sstrict\r\ncatch\s{read\s$chan}\scres\r\nputs\s$cres\s;#->\serror\sreading\s"file*":\sinvalid\sor\sincomplete\smultibyte\sor\swide\scharacter\r\nputs\s[list\seof\s[eof\s$chan]]\s;#->\seof\s1\r\nputs\s[list\sposition\s[tell\s$chan]]\s;#->\sposition\s1\r\nchan\sconfigure\s$chan\s-encoding\siso8859-1\r\ncatch\s{read\s$chan}\scres\r\nputs\s$cres]\s;#->\serror\sreading\s"file*":\sinvalid\sor\sincomplete\smultibyte\sor\swide\scharacter\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 [read]\serror\spersists\son\schannel\swith\sstrict\sencoding\safter\sencoding\sis\schanged\sto\sbinary
J type Bug
K eabcbd08274f2d22351fa96d972e4abfd08a8329
U pooryorick
Z 077de536cdee05dead020a56cef78cf5