Overview
| Artifact ID: | e7e35975705284775928cdbda14f339180fd99997da9cb969843302d89a923c8 |
|---|---|
| Ticket: | b8f575aa2398b0e44b5a037326b9d75037e2da4a
Tcl 9: eof erroneously flagged with not reported encoding read error |
| User & Date: | pointsman on 2023-02-18 15:30:04 |
Changes
- icomment:
Jan, it seems to me that you just not agree with [read] and [gets] should raise error if an encoding error happens on the channel to read from. Or in other words you think the current implementation is the right way to do this (and the hanging [gets] is just a bug pending to be fixed). Some folks (including me) think [read] and [gets] should rise error right away on encoding error on the channel. If I understood correctly most if not all participants on the February Tcl video meeting agrees on that. We should then perhaps try to get agreement on high level about that question. On the formal side I think the current trunk behaviour (need double read to raise error on encoding error) isn't described clearly by any TIP. Please correct me, if I'm wrong. The difference between the two approaches is mainly the reporting of the so far decoded data from the channel. This is perhaps a bit more convenient done with what is currently on trunk. Some folks in the video meeting also claimed that it is important to get to the decoded data up to the error. While I agree that there must be a way to get to that data for/in special cases (and pooryoricks approach also fullfill that) I think that in the huge majority of cases an encoding error on the channel will just be handled in aborting the action and to notice the user about that. What else will you do with incomplete input data, especially because the so far decoded data may even be mis-interpreted (if the read data it in another encoding than expected by the channel)? So changing the semantics of read/gets in a bit surprising way (for Tclers as well as programmers familiar with other langugages) for a bit more convenience in rare / special cases seems wrong to me.
- login: "pointsman"
- mimetype: "text/plain"