summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-02-18 17:34:25 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-02-18 17:34:25 (GMT)
commitcd3942fc69fba10b956f315c7316b07e62aed863 (patch)
treef23de35c6234cb8358fd58d7c67964572782da98 /generic/tclEncoding.c
parent17937027a396cfdcf95f090f79a89faa47cb03e5 (diff)
parentc731ca1ffdd3e7cc90cf064ac89b2f71551958ce (diff)
downloadtcl-cd3942fc69fba10b956f315c7316b07e62aed863.zip
tcl-cd3942fc69fba10b956f315c7316b07e62aed863.tar.gz
tcl-cd3942fc69fba10b956f315c7316b07e62aed863.tar.bz2
Merge 8.7 to pick up UTF-8 encoding fix
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 4d5743c..2095b4c 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -2454,11 +2454,14 @@ UtfToUtfProc(
}
if (PROFILE_REPLACE(profile)) {
ch = UNICODE_REPLACE_CHAR;
+ ++src;
} else {
/* TCL_ENCODING_PROFILE_TCL8 */
ch = UCHAR(*src);
+ char chbuf[2];
+ chbuf[0] = UCHAR(*src++); chbuf[1] = 0;
+ TclUtfToUCS4(chbuf, &ch);
}
- ++src;
}
else {
/*