diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-12 18:59:04 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-12 18:59:04 (GMT) |
| commit | 648162204d4c9bd80cde739b4cad361de6ebe6f1 (patch) | |
| tree | 183773242a85ee384881e3ed8e2f5cef49c030ae /generic/tclParse.c | |
| parent | 09f4817353f0b33e04d9866888e1408a16b1afa6 (diff) | |
| download | tcl-648162204d4c9bd80cde739b4cad361de6ebe6f1.zip tcl-648162204d4c9bd80cde739b4cad361de6ebe6f1.tar.gz tcl-648162204d4c9bd80cde739b4cad361de6ebe6f1.tar.bz2 | |
First, experimental implementation of TIP #575. Barely tested, will fail. WIP
Diffstat (limited to 'generic/tclParse.c')
| -rw-r--r-- | generic/tclParse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index 132e804..49ee348 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -789,7 +789,7 @@ TclParseBackslash( * written. At most 4 bytes will be written there. */ { const char *p = src+1; - Tcl_UniChar unichar = 0; + int unichar; int result; int count; char buf[4] = ""; @@ -936,13 +936,13 @@ TclParseBackslash( */ if (Tcl_UtfCharComplete(p, numBytes - 1)) { - count = TclUtfToUniChar(p, &unichar) + 1; /* +1 for '\' */ + count = TclUtfToUCS4(p, &unichar) + 1; /* +1 for '\' */ } else { - char utfBytes[4]; + char utfBytes[8]; memcpy(utfBytes, p, numBytes - 1); utfBytes[numBytes - 1] = '\0'; - count = TclUtfToUniChar(utfBytes, &unichar) + 1; + count = TclUtfToUCS4(utfBytes, &unichar) + 1; } result = unichar; break; |
