summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFont.c4
-rw-r--r--generic/tkSelect.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 916c48b..34f8921 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -2738,8 +2738,8 @@ Tk_CharBbox(
x += chunkPtr->x;
}
if (widthPtr != NULL) {
- Tk_MeasureChars(tkfont, end, Tcl_UtfNext(end) - end,
- -1, 0, &w);
+ int ch;
+ Tk_MeasureChars(tkfont, end, TkUtfToUniChar(end, &ch), -1, 0, &w);
}
goto check;
}
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index ded8a11..9fd3970 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -1401,11 +1401,12 @@ HandleTclCommand(
cmdInfoPtr->charOffset += Tcl_NumUtfChars(string, -1);
cmdInfoPtr->buffer[0] = '\0';
} else {
+ Tcl_UniChar ch = 0;
p = string;
string += count;
numChars = 0;
while (p < string) {
- p = Tcl_UtfNext(p);
+ p += Tcl_UtfToUniChar(p, &ch);
numChars++;
}
cmdInfoPtr->charOffset += numChars;