summaryrefslogtreecommitdiffstats
path: root/win/tkWinGDI.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-07-14 14:22:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-07-14 14:22:39 (GMT)
commit4a1490a9b856ec83b481927d4ca4fb524d1f9d08 (patch)
treef03fd22fafc34656ac01ed55e4d478fc8d405719 /win/tkWinGDI.c
parent339b9903f1039dc566f9661f8f3ef6597a6ca244 (diff)
parent82dcca7e4625e34eeb5b87807a8f23bf6ae924a0 (diff)
downloadtk-4a1490a9b856ec83b481927d4ca4fb524d1f9d08.zip
tk-4a1490a9b856ec83b481927d4ca4fb524d1f9d08.tar.gz
tk-4a1490a9b856ec83b481927d4ca4fb524d1f9d08.tar.bz2
Merge tk_print
Diffstat (limited to 'win/tkWinGDI.c')
-rw-r--r--win/tkWinGDI.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tkWinGDI.c b/win/tkWinGDI.c
index 9f04187..36514b8 100644
--- a/win/tkWinGDI.c
+++ b/win/tkWinGDI.c
@@ -4793,10 +4793,10 @@ static int PrintSelectPrinter(
* script level.
*/
- WCHAR *varlink1 = (WCHAR *) Tcl_Alloc(100 * sizeof(char));
- WCHAR **varlink2 = (WCHAR **) Tcl_Alloc(sizeof(char *));
+ char *varlink1 = (char *) Tcl_Alloc(100 * sizeof(char));
+ char **varlink2 = (char **) Tcl_Alloc(sizeof(char *));
*varlink2 = varlink1;
- wcscpy(varlink1, localPrinterName);
+ WideCharToMultiByte(CP_UTF8, 0, localPrinterName, -1, varlink1, 0, NULL, NULL);
Tcl_LinkVar(interp, "::tk::print::printer_name", (char*)varlink2,
TCL_LINK_STRING | TCL_LINK_READ_ONLY);