summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index a2227f7..92482d6 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -979,6 +979,12 @@ TclParseBackslash(
if (readPtr != NULL) {
*readPtr = count;
}
+ if ((result & 0xFC00) == 0xD800) {
+ dst[2] = (char) ((result | 0x80) & 0xBF);
+ dst[1] = (char) (((result >> 6) | 0x80) & 0xBF);
+ dst[0] = (char) ((result >> 12) | 0xE0);
+ return 3;
+ }
return Tcl_UniCharToUtf(result, dst);
}