summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-15 20:13:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-15 20:13:09 (GMT)
commit8a1ad98c65dfee7455ba11435fd63de6fbf46c70 (patch)
tree8852716f66e187b6a2a51de561b67e58df99dcb8 /unix
parent2396bd5523304d4938cec1aa241067fcd29f8d9a (diff)
downloadtk-8a1ad98c65dfee7455ba11435fd63de6fbf46c70.zip
tk-8a1ad98c65dfee7455ba11435fd63de6fbf46c70.tar.gz
tk-8a1ad98c65dfee7455ba11435fd63de6fbf46c70.tar.bz2
Introduce TCL_ENCODING_PROFILE_TCL8, making the behavior of Tk independant on what the default profile is
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixFont.c2
-rw-r--r--unix/tkUnixSelect.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index c32518c..56d1797 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -1122,7 +1122,7 @@ Tk_MeasureChars(
} else {
lastSubFontPtr = FindSubFontForChar(fontPtr, ch, NULL);
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternal(NULL, familyPtr->encoding, p, next - p, 0, NULL,
+ Tcl_UtfToExternal(NULL, familyPtr->encoding, p, next - p, TCL_ENCODING_PROFILE_TCL8, NULL,
(char *)&buf[0].byte1, sizeof(buf), NULL, &dstWrote, NULL);
if (familyPtr->isTwoByteFont) {
newX += XTextWidth16(lastSubFontPtr->fontStructPtr,
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 9b0437f..db9fa96 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -377,7 +377,7 @@ TkSelPropProc(
* this is the first and/or last chunk.
*/
- encodingCvtFlags = 0;
+ encodingCvtFlags = TCL_ENCODING_PROFILE_TCL8;
if (incrPtr->converts[i].offset == 0) {
encodingCvtFlags |= TCL_ENCODING_START;
}
@@ -1226,8 +1226,8 @@ SelRcvIncrProc(
while (1) {
result = Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
- retrPtr->encFlags, &retrPtr->encState,
- dst, dstLen, &srcRead, &dstWrote, NULL);
+ TCL_ENCODING_PROFILE_TCL8|retrPtr->encFlags,
+ &retrPtr->encState, dst, dstLen, &srcRead, &dstWrote, NULL);
soFar = dst + dstWrote - Tcl_DStringValue(dstPtr);
retrPtr->encFlags &= ~TCL_ENCODING_START;
src += srcRead;