summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-19 12:05:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-19 12:05:28 (GMT)
commit435849382625fcaae854915d50512dd1e6f27f2c (patch)
treecdabe9c60a5c8e415cbb4f7f05dd9b2b59372edf /generic/tkEntry.c
parent71040c30eb391126e584a0acccd1562f9759d375 (diff)
parent26807808cc400ad9a0eab231cd691bd5d6722a76 (diff)
downloadtk-435849382625fcaae854915d50512dd1e6f27f2c.zip
tk-435849382625fcaae854915d50512dd1e6f27f2c.tar.gz
tk-435849382625fcaae854915d50512dd1e6f27f2c.tar.bz2
Enhanced proposed fix [6c0d7aec67]: unicode text input Windows 8. More places where Unicode surrogate handling could be improved.
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r--generic/tkEntry.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index c0ce47b..ff3f134 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -1924,8 +1924,8 @@ EntryComputeGeometry(
*/
if (entryPtr->showChar != NULL) {
- Tcl_UniChar ch;
- char buf[TCL_UTF_MAX];
+ int ch;
+ char buf[6];
int size;
/*
@@ -1935,8 +1935,8 @@ EntryComputeGeometry(
* resulting string.
*/
- Tcl_UtfToUniChar(entryPtr->showChar, &ch);
- size = Tcl_UniCharToUtf(ch, buf);
+ TkUtfToUniChar(entryPtr->showChar, &ch);
+ size = TkUniCharToUtf(ch, buf);
entryPtr->numDisplayBytes = entryPtr->numChars * size;
p = ckalloc(entryPtr->numDisplayBytes + 1);