summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-25 10:19:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-25 10:19:59 (GMT)
commita2eecbce351c9dc1436c1a7a1582e1df477e7d8d (patch)
tree4b59752f71961a6e9980f303cbd1ae83923c5450 /generic
parentc5c9fa0e4dbf09d2526d3e6c40d846217187b69f (diff)
parent0eb68c7b8271c5fe018e7b2a992ac1def4598879 (diff)
downloadtk-a2eecbce351c9dc1436c1a7a1582e1df477e7d8d.zip
tk-a2eecbce351c9dc1436c1a7a1582e1df477e7d8d.tar.gz
tk-a2eecbce351c9dc1436c1a7a1582e1df477e7d8d.tar.bz2
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkClipboard.c8
-rw-r--r--generic/tkCmds.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index a972230..1f4298d 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -709,7 +709,13 @@ ClipboardGetProc(
* used). */
const char *portion) /* New information to be appended. */
{
- Tcl_DStringAppend((Tcl_DString *)clientData, portion, -1);
+ Tcl_Encoding utf8 = Tcl_GetEncoding(NULL, "utf-8");
+ Tcl_DString ds;
+
+ Tcl_ExternalToUtfDString(utf8, portion, -1, &ds);
+ Tcl_DStringAppend((Tcl_DString *) clientData, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
+ Tcl_DStringFree(&ds);
+ Tcl_FreeEncoding(utf8);
return TCL_OK;
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index e57f21e..36981af 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -1113,14 +1113,16 @@ Tk_TkwaitObjCmd(
static char *
WaitVariableProc(
ClientData clientData, /* Pointer to integer to set to 1. */
- TCL_UNUSED(Tcl_Interp *), /* Interpreter containing variable. */
- TCL_UNUSED(const char *), /* Name of variable. */
+ Tcl_Interp *interp, /* Interpreter containing variable. */
+ const char *name1, /* Name of variable. */
TCL_UNUSED(const char *), /* Second part of variable name. */
TCL_UNUSED(int)) /* Information about what happened. */
{
int *donePtr = (int *)clientData;
*donePtr = 1;
+ Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
+ WaitVariableProc, clientData);
return NULL;
}