summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIO.c10
-rw-r--r--tests/io.test2
2 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 37bef84..4715954 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4345,6 +4345,16 @@ Write(
}
dst = InsertPoint(bufPtr);
dstLen = SpaceLeft(bufPtr);
+
+ /*
+ * Transfer encoding strict option to the encoding flags
+ */
+
+ if (statePtr->flags & CHANNEL_ENCODING_NOCOMPLAIN) {
+ statePtr->outputEncodingFlags |= TCL_ENCODING_NOCOMPLAIN;
+ } else {
+ statePtr->outputEncodingFlags &= ~TCL_ENCODING_NOCOMPLAIN;
+ }
result = Tcl_UtfToExternal(NULL, encoding, src, srcLimit,
statePtr->outputEncodingFlags,
diff --git a/tests/io.test b/tests/io.test
index aeec781..dbb74f0 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -9014,7 +9014,7 @@ test io-75.4 {multibyte encoding error read results in raw bytes (-strictencodin
flush $f
seek $f 0
fconfigure $f -encoding utf-8 -buffering none
-} -constraints knownBug -body {
+} -body {
read $f
} -cleanup {
close $f