diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-19 12:05:28 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-19 12:05:28 (GMT) |
commit | 06f3173fc0a3402010291caa151baa8fef3e5a9d (patch) | |
tree | cdabe9c60a5c8e415cbb4f7f05dd9b2b59372edf /generic/ttk | |
parent | b5deacd1f7c7553a45b73fffe25053df18895a8c (diff) | |
parent | bdb580aa2563588e6e1f5090bb9b89369e2f2d4f (diff) | |
download | tk-06f3173fc0a3402010291caa151baa8fef3e5a9d.zip tk-06f3173fc0a3402010291caa151baa8fef3e5a9d.tar.gz tk-06f3173fc0a3402010291caa151baa8fef3e5a9d.tar.bz2 |
Enhanced proposed fix [6c0d7aec67]: unicode text input Windows 8. More places where Unicode surrogate handling could be improved.
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkEntry.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 533637d..a25574a 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -282,11 +282,11 @@ static char *EntryDisplayString(const char *showChar, int numChars) { char *displayString, *p; int size; - Tcl_UniChar ch; - char buf[TCL_UTF_MAX]; + int ch; + char buf[6]; - Tcl_UtfToUniChar(showChar, &ch); - size = Tcl_UniCharToUtf(ch, buf); + TkUtfToUniChar(showChar, &ch); + size = TkUniCharToUtf(ch, buf); p = displayString = ckalloc(numChars * size + 1); while (numChars--) { @@ -406,7 +406,7 @@ ExpandPercents( int number, length; const char *string; int stringLength; - Tcl_UniChar ch; + int ch; char numStorage[2*TCL_INTEGER_SPACE]; while (*template) { @@ -430,7 +430,7 @@ ExpandPercents( */ ++template; /* skip over % */ if (*template != '\0') { - template += Tcl_UtfToUniChar(template, &ch); + template += TkUtfToUniChar(template, &ch); } else { ch = '%'; } @@ -480,7 +480,7 @@ ExpandPercents( string = Tk_PathName(entryPtr->core.tkwin); break; default: - length = Tcl_UniCharToUtf(ch, numStorage); + length = TkUniCharToUtf(ch, numStorage); numStorage[length] = '\0'; string = numStorage; break; |