diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-29 12:03:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-29 12:03:43 (GMT) |
commit | 4c158f250ca869188d30dcf7628676f0b0de236f (patch) | |
tree | a7130678e7d225c7e0c128f344c6f24f961b670d /generic/ttk/ttkEntry.c | |
parent | 9fd7a0895dc0c93d3796ad72eccdc631d21f54ac (diff) | |
parent | af17312e4d83e5ea367efbed4baf6fa32a067aa4 (diff) | |
download | tk-4c158f250ca869188d30dcf7628676f0b0de236f.zip tk-4c158f250ca869188d30dcf7628676f0b0de236f.tar.gz tk-4c158f250ca869188d30dcf7628676f0b0de236f.tar.bz2 |
Fix [6c0d7aec6713ab6a7c3e12dff7f26bff4679bc9d|6c0d7aec67]: unicode text input Windows 8. Added some test-cases using the "font actual" command.
Diffstat (limited to 'generic/ttk/ttkEntry.c')
-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; |