From 4ea0a28f62fa2dbe82cd9a35ca3d5f3a9dfab890 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 13 Aug 2024 08:51:04 +0000 Subject: Mark incr-1.31 testcase as "knownBug" in 8.6. Is not fixed yet on 64-bit platforms. --- tests/incr.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/incr.test b/tests/incr.test index ff328b7..33ace2e 100644 --- a/tests/incr.test +++ b/tests/incr.test @@ -236,7 +236,7 @@ test incr-1.30 {TclCompileIncrCmd: array var, braced (no subs)} -setup { incr {array($foo)} } -result 5 -test incr-1.31 {no overflow in TclCompileIncrCmd and Tcl_IncrObjCmd, bug [7179c6724cd38271]} { +test incr-1.31 {no overflow in TclCompileIncrCmd and Tcl_IncrObjCmd, bug [7179c6724cd38271]} knownBug { # TclCompileIncrCmd: compiled incr TEBC with immutable constant offs (INST_INCR_*_IMM instructions): lappend res [set i 0; incr i 0x7FFFFFFF] lappend res [set i 0; incr i 0xFFFFFF80] -- cgit v0.12 From 5f35d72a7b9c31d100b085b650969e6abe8720ff Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 13 Aug 2024 13:27:10 +0000 Subject: Fix [2f22a7364d]: cesu-8 encoding gives same result for different strings --- generic/tclEncoding.c | 2 +- tests/encoding.test | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 380f3ed..95186af 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2602,7 +2602,7 @@ UtfToUtfProc( *dst++ = 0xED; *dst++ = (char) (((ch >> 16) & 0x0F) | 0xA0); *dst++ = (char) (((ch >> 10) & 0x3F) | 0x80); - ch = (ch & 0x0CFF) | 0xDC00; + ch = (ch & 0x03FF) | 0xDC00; } goto cesu8; } else if ((ch | 0x7FF) == 0xDFFF) { diff --git a/tests/encoding.test b/tests/encoding.test index 5530178..86831b2 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -468,6 +468,9 @@ test encoding-15.30 {UtfToUtfProc -profile strict CESU-8} { test encoding-15.31 {UtfToUtfProc -profile strict CESU-8 (bytes F0-F4 are invalid)} -body { encoding convertfrom -profile strict cesu-8 \xF1\x86\x83\x9C } -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xF1'} +test encoding-15.32 {UtfToUtfProc CESU-8 [2f22a7364d]} -body { + encoding convertto cesu-8 \U1f600 +} -result \xED\xA0\xBD\xED\xB8\x80 test encoding-16.1 {Utf16ToUtfProc} -body { set val [encoding convertfrom utf-16 NN] -- cgit v0.12