Skip to content
Tcl Source Code Artifact [edbb8d5493]
Login

Artifact [edbb8d5493]

Artifact edbb8d5493c7cd4fcaa9120de00cc78a46031668:

Ticket change [edbb8d5493] - Open ticket [879a0747bee593e2|879a0747be]: <i>Incomplete multibyte char @eof -&gt; failed read</i> plus 4 other changes by ferrieux on 2015-04-24 22:22:37.
D 2015-04-24T22:22:37.904
J closer nobody
J icomment Reopening\sbecause\sI\sthink\sthere's\sstill\ssomething\swrong:\r\n\r\n\s-assume\swe're\sdoing\sa\skind\sof\s"tail\s-f"\s(purpose\sof\sfleeting\sEOF)\son\sa\sfile\sthat\swe\sopened\swith\sencoding\sutf-8\r\n\r\n\s-assume\sanother\sprocess\sslowly\swrites\sto\sit\sthe\ssubsequent\stwo\sbytes\s\\xC3\sand\s\\xA9\s\r\n\r\n\s=>\sour\sreader\sgets\stwo\ssubsequent\scharacters\s"Ã"\sand\s"©"\r\n\r\n\s-replay\sthe\ssame\sscenario\sbut\swith\sthe\stwo\sbytes\salready\sin,\sor\swritten\sfast\senough\sthat\sthe\sreader\sgets\sboth\sin\sone\sshot\r\n\r\n\s=>\sour\sreader\sgets\sthe\ssingle\schar\s"é"\r\n\r\nSo\sit\sseems\sthat\swhen\sthe\sfleeting\sEOF\shappens\sin\smid-multibyte,\sthe\struncated\ssequence\sis\ssomehow\smapped\sto\sa\scharacter.\sInstead,\sit\sshould\sbe\sstored\sin\sinternal\sstate,\sand\sno\scharacter\sshould\sbe\sreturned\suntil\sthe\ssequence\scompletes.\sEasier\ssaid\sthan\sdone,\sI'll\sadmit.
J login ferrieux
J mimetype text/plain
J status Open
K 879a0747bee593e2cd0f531fa723f5f5d5595527
U ferrieux
Z bec76124161e07216a88ea9ef9b42419