summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
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 63ebdf4..c521826 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -3306,6 +3306,7 @@ TableToUtfProc(
} else if (PROFILE_REPLACE(flags)) {
ch = UNICODE_REPLACE_CHAR;
} else {
+ /* For prefix bytes, we don't fallback to cp1252, see [1355b9a874] */
ch = (Tcl_UniChar)byte;
}
} else {
@@ -3326,7 +3327,9 @@ TableToUtfProc(
if (PROFILE_REPLACE(flags)) {
ch = UNICODE_REPLACE_CHAR;
} else {
- ch = (Tcl_UniChar)byte;
+ char chbuf[2];
+ chbuf[0] = byte; chbuf[1] = 0;
+ Tcl_UtfToUniChar(chbuf, &ch);
}
}