read hangs on utf-8 channel
Closed / Fixedbc5b790099f7f89ba5f213bbf7bc92a22414f063Created 12 years agoUpdated 12 years ago
Descriptionplain2014-10-01 18:55:27
The following script hangs at the final read.
# ----
set data {gi4uIMKn4oCCLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u4oCCLi4gwqfigIIK}
set f [file tempfile]
chan configure $f -encoding binary
puts -nonewline $f [binary decode base64 $data]
flush $f
seek $f 0
chan configure $f -encoding utf-8
puts stderr "about to read"
set newdata [read $f 130]
puts stderr [string length $newdata]
# ----
Referenced by2
32edfe9722[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. check-in2014-10-02 14:46:54df382f0bf1[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. check-in2014-10-02 14:43:10
dgp Ticket [bc5b790099]: 4 changes
[History diff]2014-10-01 19:02:56
dgpplain2014-10-01 19:31:14
Bug enters in checkin 2e1e7c8266 . Almost certainly enters also in 04b06f7cea breaking 8.5.16 in the same way.
dgpplain2014-10-02 14:03:33
The padding for Tcl_ExternalToUtf() was calculated wrong. Testing a fix...
dgpplain2014-10-02 14:47:18
Fix with test committed.
Log in (anonymous is fine) to add a comment.