diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-15 13:59:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-15 13:59:15 (GMT) |
commit | 2ceb66085cce189623bc7599227ecb018fffbecb (patch) | |
tree | 2ab12e9667a526da6d58174d3687a9c983b275df /generic/tclStringObj.c | |
parent | e59865fa4049fc16cc1b6e41e5af3b39c041b393 (diff) | |
parent | 9daf0e2a9975554c4473e2233f05dac5131ff6cf (diff) | |
download | tcl-2ceb66085cce189623bc7599227ecb018fffbecb.zip tcl-2ceb66085cce189623bc7599227ecb018fffbecb.tar.gz tcl-2ceb66085cce189623bc7599227ecb018fffbecb.tar.bz2 |
Merge 9.0. Don't combine surrogates when appending UTF-32 strings
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index c8d9df7..76b703e 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -4063,14 +4063,6 @@ ExtendUnicodeRepWithString( dst = stringPtr->unicode + numOrigChars; if (numAppendChars-- > 0) { bytes += TclUtfToUniChar(bytes, &unichar); -#if TCL_UTF_MAX > 3 - /* join upper/lower surrogate */ - if (bytes && (stringPtr->unicode[numOrigChars - 1] | 0x3FF) == 0xDBFF && (unichar | 0x3FF) == 0xDFFF) { - stringPtr->numChars--; - unichar = ((stringPtr->unicode[numOrigChars - 1] & 0x3FF) << 10) + (unichar & 0x3FF) + 0x10000; - dst--; - } -#endif *dst++ = unichar; while (numAppendChars-- > 0) { bytes += TclUtfToUniChar(bytes, &unichar); |