diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-02 16:43:12 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-02 16:43:12 (GMT) |
commit | 100d8ce724b2ed4d9f15a045bc2e48119b53465f (patch) | |
tree | c8b2e9165dbead0dff99e1cecaf8c4c3a7e731ff /generic/tclIO.c | |
parent | e31133e3b0149b9bc29c9c6f06e76ccc6994df7e (diff) | |
download | tcl-100d8ce724b2ed4d9f15a045bc2e48119b53465f.zip tcl-100d8ce724b2ed4d9f15a045bc2e48119b53465f.tar.gz tcl-100d8ce724b2ed4d9f15a045bc2e48119b53465f.tar.bz2 |
Update tests to use -encodingprofile
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 47740ef..b76234b 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8017,6 +8017,21 @@ Tcl_GetChannelOption( return TCL_OK; } } + if (len == 0 || HaveOpt(1, "-encodingprofile")) { + if (len == 0) { + Tcl_DStringAppendElement(dsPtr, "-encodingprofile"); + } + if (flags & CHANNEL_ENCODING_STRICT) { + Tcl_DStringAppendElement(dsPtr, "strict"); + } else if (flags & CHANNEL_ENCODING_NOCOMPLAIN) { + Tcl_DStringAppendElement(dsPtr, "tcl8"); + } else { + Tcl_DStringAppendElement(dsPtr, ""); + } + if (len > 0) { + return TCL_OK; + } + } if (len == 0 || HaveOpt(2, "-eofchar")) { if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-eofchar"); @@ -8060,21 +8075,6 @@ Tcl_GetChannelOption( return TCL_OK; } } - if (len == 0 || HaveOpt(1, "-encodingprofile")) { - if (len == 0) { - Tcl_DStringAppendElement(dsPtr, "-encodingprofile"); - } - if (flags & CHANNEL_ENCODING_STRICT) { - Tcl_DStringAppendElement(dsPtr, "strict"); - } else if (flags & CHANNEL_ENCODING_NOCOMPLAIN) { - Tcl_DStringAppendElement(dsPtr, "tcl8"); - } else { - Tcl_DStringAppendElement(dsPtr, ""); - } - if (len > 0) { - return TCL_OK; - } - } if (len == 0 || HaveOpt(1, "-translation")) { if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-translation"); |