diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-19 15:40:40 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-19 15:40:40 (GMT) |
| commit | 9dabd6f1accf6870c461a9ed5ae931aee09de1fe (patch) | |
| tree | c77c58780accb181a88bfca6b6a287cf5def9100 | |
| parent | 553147da5365bc0f8027e5f2a39dae6224daa5fb (diff) | |
| download | tcl-9dabd6f1accf6870c461a9ed5ae931aee09de1fe.zip tcl-9dabd6f1accf6870c461a9ed5ae931aee09de1fe.tar.gz tcl-9dabd6f1accf6870c461a9ed5ae931aee09de1fe.tar.bz2 | |
When changing the -nocomplainencoding or -strictencoding settings of a channel, reset the CHANNEL_NEED_MORE_DATA and CHANNEL_ENCODING_ERROR flags, so we can continue reading the channel and find out what's going on.
| -rw-r--r-- | generic/tclIO.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 730d963..e6e3560 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8364,6 +8364,7 @@ Tcl_SetChannelOption( } #endif } + ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR); return TCL_OK; } else if (HaveOpt(1, "-strictencoding")) { int newMode; @@ -8377,6 +8378,7 @@ Tcl_SetChannelOption( } else { ResetFlag(statePtr, CHANNEL_ENCODING_STRICT); } + ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR); return TCL_OK; } else if (HaveOpt(1, "-translation")) { const char *readMode, *writeMode; |
