diff options
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index a2227f7..00b83a1 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -979,7 +979,12 @@ TclParseBackslash( if (readPtr != NULL) { *readPtr = count; } - return Tcl_UniCharToUtf(result, dst); + count = Tcl_UniCharToUtf(result, dst); + if (!count) { + /* Special case for handling upper surrogates. */ + count = Tcl_UniCharToUtf(-1, dst); + } + return count; } /* |