diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-20 14:19:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-20 14:19:35 (GMT) |
commit | 8b0dc386ba157ee639f73baca83a0a5d732d0f35 (patch) | |
tree | 88236bba271acf23287bd15349a5efe4116af07b | |
parent | cc2747afa84298fa9e583a491f772524708e24a7 (diff) | |
parent | 5319a7d93f431d1921f3c93112027d79e43b988a (diff) | |
download | tcl-8b0dc386ba157ee639f73baca83a0a5d732d0f35.zip tcl-8b0dc386ba157ee639f73baca83a0a5d732d0f35.tar.gz tcl-8b0dc386ba157ee639f73baca83a0a5d732d0f35.tar.bz2 |
Merge 8.7
-rw-r--r-- | generic/tclEncoding.c | 3 | ||||
-rw-r--r-- | tests/chanio.test | 2 | ||||
-rw-r--r-- | tests/io.test | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 27e7278..f9a5e6a 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -3455,7 +3455,8 @@ TableToUtfProc( } else if (PROFILE_REPLACE(flags)) { ch = UNICODE_REPLACE_CHAR; } else { - numChars++; /* Silently consume */ + src--; /* See bug [bdcb5126c0] */ + result = TCL_CONVERT_MULTIBYTE; break; } } else { diff --git a/tests/chanio.test b/tests/chanio.test index 5aae994..ee6133e 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -1104,7 +1104,7 @@ test chan-io-7.3 {FilterInputBytes: split up character at EOF} -setup { lappend x [chan gets $f line] $line } -cleanup { chan close $f -} -result [list 15 "123456789012301" 17 1 1 -1 ""] +} -result [list 15 "123456789012301" 18 0 1 -1 ""] test chan-io-7.4 {FilterInputBytes: recover from split up character} -setup { variable x "" } -constraints {stdio fileevent} -body { diff --git a/tests/io.test b/tests/io.test index 7b96c51..538f554 100644 --- a/tests/io.test +++ b/tests/io.test @@ -1201,7 +1201,7 @@ test io-7.3 {FilterInputBytes: split up character at EOF} {testchannel} { lappend x [gets $f line] $line close $f set x -} [list 15 "123456789012301" 17 1 1 -1 ""] +} [list 15 "123456789012301" 18 0 1 -1 ""] test io-7.4 {FilterInputBytes: recover from split up character} {stdio fileevent} { set f [open "|[list [interpreter] $path(cat)]" w+] fconfigure $f -encoding binary -buffering none |